1

HTML5 / JSを使用してアプリをビルドしていますが、何らかの理由でCSSが適用されていません。まだデフォルトの色が表示されています。windows + Iを押したときに上書きできませんか?

参考のためにCSSを次に示します。

.win-settingsflyout {
    background-color: #fff;
}
4

4 に答える 4

2

色を適用するクラスを作成するだけです。

<style>
.colors{background-color: lightblue;}
</style>

次に、このクラスをdivタグに追加します。<div class='win-content colors'></div>

それがうまくいくことを願っています!

于 2013-01-06T03:27:15.097 に答える
1

ここに、「約」フライアウトのサンプルアプリがあります。背景は赤です。

<div class="win-content" style="background: red;">

完全なコード:

<!doctype HTML>
<html>
    <head>
        <title>About</title>
        <script src="//Microsoft.WinJS.1.0/js/base.js" type="text/javascript"></script>
        <script src="//Microsoft.WinJS.1.0/js/ui.js" type="text/javascript"></script>
        <script type="text/javascript">WinJS.UI.processAll();</script>
        <script src="/js/about.js"></script>
        <link href="/css/about.css" rel="stylesheet" />
    </head>
    <body>
        <!-- BEGINSETTINGSFLYOUT -->
        <div class="apback" data-win-control="WinJS.UI.SettingsFlyout" aria-label="App Settings Flyout" data-win-options="{settingsCommandId:'about',width:'narrow'}">
            <!-- Use either 'win-ui-light' or 'win-ui-dark' depending on the contrast between the header title and background color -->
            <div class="win-ui-dark win-header" style="background-color: #333333"> <!-- Background color reflects app's personality -->
                <button type="button" onclick="WinJS.UI.SettingsFlyout.show()" class="win-backbutton"></button>
                <div class="win-label"><span data-win-res="{textContent: 'info'}"></span></div>
                <img src="../images/smalllogo.png" style="position: absolute; right: 40px;"/>
            </div>
        <div class="win-content" style="background: red;">
                <div class="win-settings-section">
                    <label>Test App</label>
                    <label>users</label>           

                 </div>
            </div>
        </div>
        <!-- ENDSETTINGSFLYOUT -->
    </body>
</html>
于 2012-10-22T20:14:20.193 に答える
1

できません。常にスタート画面の色が表示されます

于 2012-10-19T21:02:33.350 に答える
0

このCSSコードを使用して、設定のフライアウトの背景色の変更を「プッシュ」できます。

.win-settingsflyout {
    background-color: #fff !important; background: #fff !important;
}
于 2012-10-20T20:52:28.973 に答える