HTML5 / JSを使用してアプリをビルドしていますが、何らかの理由でCSSが適用されていません。まだデフォルトの色が表示されています。windows + Iを押したときに上書きできませんか?
参考のためにCSSを次に示します。
.win-settingsflyout {
background-color: #fff;
}
色を適用するクラスを作成するだけです。
<style>
.colors{background-color: lightblue;}
</style>
次に、このクラスをdivタグに追加します。<div class='win-content colors'></div>
それがうまくいくことを願っています!
ここに、「約」フライアウトのサンプルアプリがあります。背景は赤です。
<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>
できません。常にスタート画面の色が表示されます
このCSSコードを使用して、設定のフライアウトの背景色の変更を「プッシュ」できます。
.win-settingsflyout {
background-color: #fff !important; background: #fff !important;
}