-3
A
答えて
0
CSSで@mediaルールを使用できます。
この例では、画面サイズに応じてbodyタグとdivタグの背景色を変更します。
@media screen and (max-width: 400px) {
body {
background-color: lightgreen;
}
.mydiv {
background-color:#000;
}
}
@media screen and (min-width: 401px) and (max-width: 1000px) {
body {
background-color: green;
}
.mydiv {
background-color:#444;
}
}
@media screen and (min-width: 1001px) {
body {
background-color: blue;
}
.mydiv {
background-color:#999;
}
}
.mydiv {
width:100%;
height:20px;
margin:10px 0;
}
<div class="mydiv">
</div>
<div class="mydiv">
</div>
<div class="mydiv">
</div>
関連する問題
- 1. PGTとPGTIOUの保存CASが生成する
- 2. これまでのところ、次の私はD3</p> <p><a href="https://i.stack.imgur.com/j8xLX.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j8xLX.jpg" alt="enter image description here"></a></p> <p>で、次の再作成しようとしている
- 3. SearchViewはここ<a href="https://imgur.com/a/Z9dTQ" rel="nofollow noreferrer">http://imgur.com/a/Z9dTQ</a></p> <p>見られるように、スイッチタブ
- 4. HTMLイメージマップでは、これが現在のプロジェクト<a href="http://bit.ly/t43Sap" rel="nofollow">http://bit.ly/t43Sap</a></p> <p>である、それはここで私の落書きのようにそれを行うことが可能である、
- 5. CSS - 私はここでは、この</p> <p><a href="https://i.stack.imgur.com/QbSCj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QbSCj.png" alt="enter image description here"></a></p> <p>のようなボーダーのスタイルをCSSを使用するにはどうすればよい
- 6. CSS:</p> <p><a href="http://jsfiddle.net/h2rsJ/2/" rel="nofollow noreferrer">http://jsfiddle.net/h2rsJ/2/</a></p> <p>、私はそれはこのようになりたい::イムがこれを持つこの権利
- 7. Imagickでキャンバス効果を作成する方法は?</p> <p><a href="http://www.imagemagick.org/Usage/photos/" rel="nofollow">http://www.imagemagick.org/Usage/photos/</a></p> <p>それは次のように達成することができ、コマンドラインを使用:見出し「テクスチャ」の下でここに見られるように
- 8. CSS:<a href="https://www.whitewreath.org.au/white-wreath-can-help/" rel="nofollow noreferrer">this page</a>では、このギャップ
- 9. ここ<a href="https://firebase.google.com/docs/firestore/query-data/listen" rel="nofollow noreferrer">here</a></p> <p>をsnapshotListener
- 10. どうすればpreg_replace @<a> @</a>〜<a> @</a>?
- 11. CSS:私は<a href="http://test.doig.com.au/MHM/" rel="nofollow noreferrer">this site</a>にこの下線
- 12. ElectronJs:</p> <p><a href="https://i.stack.imgur.com/sg72W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sg72W.png" alt="enter image description here"></a> ElectronJsでこれを達成する方法はあります:どのようにクロムツールバー
- 13. 私はこのようにそれを実装<a href="http://jqueryui.com/autocomplete/" rel="nofollow noreferrer">http://jqueryui.com/autocomplete/</a></p> <p>からウィジェットを持っ
- 14. はなぜrは月1が1月とされ、この<a href="https://i.stack.imgur.com/TSlVT.jpg" rel="nofollow noreferrer">enter image description here</a></p> <p>よう
- 15. リファレンスカラムなしで私のShiny Appでテーブル結果を得るには?私はこれを取り除くにはどうすればよい</p> <p><a href="http://i.stack.imgur.com/5wt2h.png" rel="nofollow">http://i.stack.imgur.com/5wt2h.png</a></p> <p>:
- 16. のiOSはこの</p> <p><a href="https://i.stack.imgur.com/kqz3K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kqz3K.png" alt="enter image description here"></a></p> <p>のようなメニューを、メニューを行うにはどのようにメニュー(ないactiveSheet)
- 17. どのように私は<a href="https://datatables.net/reference/option/language.loadingRecords" rel="nofollow">this</a>よう<code>loadingRecords</code>を設定し、ネイティブのDataTableに
- 18. テキストはここでjsfiddle <a href="https://jsfiddle.net/ckb2vvyz/1/" rel="nofollow">fiddle</a></p> <p>コードが何であるかを
- 19. CSS <span>のテキストを画像のタグ<a href>
- 20. 背景色の問題この</p> <p><a href="http://jsfiddle.net/esTzk/" rel="nofollow">http://jsfiddle.net/esTzk/</a></p> <p>のドロップダウンメニューで
- 21. は私のFirebaseデータベースはここでは、この</p> <p><a href="https://i.stack.imgur.com/pnh6l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pnh6l.png" alt="enter image description here"></a></p> <p>のように見えるスウィフト
- 22. 自動コンパイルと私の問題は、AppStoreにアップロードされ、このウェブサイト</p> <blockquote> <p><a href="http://www.appmakr.com/" rel="nofollow">http://www.appmakr.com/</a></p> </blockquote> <p>と同様のシステムをセットアップしようとしているtheAppstore
- 23. テーブル「セル」(td)でラベルを右揃えにするにはどうすればよいですか?このCSSで...</p> <pre><code><td> <label class="whitefont righthoralign">Search</label> </td> </code></pre> <p>:
- 24. Objective CでAndroidのようなEdittext(TextInputLayout)を作成するには?あなたはここにこの<a href="https://www.cocoacontrols.com/controls/textinputlayout" rel="nofollow noreferrer">library</a></p> <p>でTextInputLayout効果を得ることができ
- 25. これは、これが第2の画像内のXAMLコード</p> <p>の抜粋であるデータベース</p> <p><a href="https://i.stack.imgur.com/tp2NU.png" rel="nofollow noreferrer">enter image description here</a> の抜粋であるデータグリッドの単一の列/ヘッダ
- 26. Androidはどのように<a href="https://developer.android.com/studio/publish/versioning.html" rel="nofollow">this</a>ページで
- 27. は、どのように私は<a href="http://controlsjs.com/" rel="nofollow">Hello demo</a></p> <p>をしようとしていた
- 28. Akkaの俳優システムでtell()はどのように機能しますか?ドキュメント<a href="http://doc.akka.io/api/akka/2.4/#akka.actor.Actor" rel="nofollow noreferrer">here</a>と<a href="http://doc.akka.io/api/akka/2.4/#akka.actor.ActorRef" rel="nofollow noreferrer">here</a></p> <p>を見
- 29. Pandas DataFramesの列と行にどのようにラベルを付けることができますか?</p> <p><a href="https://i.stack.imgur.com/0W8rC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0W8rC.png" alt="Table"></a></p> <p>これは私がこれまで持っているものです::
- 30. は動的</p> <p><a href="http://i.stack.imgur.com/0khRU.jpg" rel="nofollow">Click for screenshot</a></p> <p>..ので、私はこのように見えるの相対レイアウトを持って事前に定義された相対的なレイアウト
すでに試してみましたが、コード、およびそれが動作していないかの説明を含むようにあなたの質問を編集してください。また、あなたに役立つかもしれません:[私はどのように良い質問をしますか?](http://stackoverflow.com/help/how-to-ask)。 – MJH