1

html、javascript、cssを使用してメトロスタイルのWindows8アプリを開発しています。

アプリケーションの下部にあるアプリバーを使用しています。以下はhtmlコードです。

<div id="appbarbottom" data-win-control="WinJS.UI.AppBar" data-win-options="{layout:'custom',placement:'bottom'}">
    <button id="playerBut" data-win-control="WinJS.UI.AppBarCommand" data-win-options="{section:'global',label:'Player', icon:'placeholder',type:'flyout',flyout:sportsFlyout}" type="button"></button>

</div>

section:'global'私はそれが右側のボタンを作ると言った公式文書をラッドしました。私はそれをしましたが、効果はありません。

試してみましsection:'selection' たが、左側にボタンが残っています

私は別の解決策を探しましたが、誰もが同じことを言っているので、どうすれば私の目標を達成できますか。

ありがとうございました。

4

1 に答える 1

1

私はから削除 'layout:custom'しましたdata-win-options="{layout:'custom',placement:'bottom'}

data-win-control="WinJS.UI.AppBar" とそれは私の問題を解決しました。

私はこれでほとんど4時間を無駄にしました。

これが他の人の役に立つことを願っています。

ありがとう。

于 2012-09-08T13:12:48.397 に答える