diff options
Diffstat (limited to 'files/ja/web/css/@media/width/index.html')
| -rw-r--r-- | files/ja/web/css/@media/width/index.html | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/files/ja/web/css/@media/width/index.html b/files/ja/web/css/@media/width/index.html deleted file mode 100644 index a0c2347d1f..0000000000 --- a/files/ja/web/css/@media/width/index.html +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: width -slug: Web/CSS/@media/width -tags: - - '@media' - - CSS - - メディアクエリ - - メディア特性 - - リファレンス -translation_of: Web/CSS/@media/width ---- -<div>{{cssref}}</div> - -<p><a href="/ja/docs/CSS">CSS</a> の <strong><code>width</code></strong> <a href="/ja/docs/Web/CSS/Media_Queries/Using_media_queries#Media_features">メディア特性</a>は、{{glossary("viewport", "ビューポート")}}の幅 (又は<a href="/ja/docs/Web/CSS/Paged_media">ページ付きメディア</a>のページボックスの幅) をテストするために使用することができます。</p> - -<h2 id="Syntax" name="Syntax">構文</h2> - -<p><code>width</code> 特性は、ビューポートの幅を表す {{cssxref("<length>")}} 値として指定します。これは範囲の特性であり、つまり接頭辞の付いた <strong><code>min-width</code></strong> 及び <code><strong>max-width</strong></code> の変化形を使用して、それぞれ最小値と最大値をクエリすることができます。</p> - -<h2 id="Example" name="Example">例</h2> - -<h3 id="HTML">HTML</h3> - -<pre class="brush: html"><div>ビューポートの幅を変更しながらこの要素を見ていてください。</div></pre> - -<h3 id="CSS">CSS</h3> - -<pre class="brush: css">/* 正確な幅 */ -@media (width: 360px) { - div { - color: red; - } -} - -/* 最小幅 */ -@media (min-width: 35rem) { - div { - background: yellow; - } -} - -/* 最大幅 */ -@media (max-width: 50rem) { - div { - border: 2px solid blue; - } -} -</pre> - -<h3 id="Result" name="Result">結果</h3> - -<p>{{EmbedLiveSample('Example','90%')}}</p> - -<h2 id="Specifications" name="Specifications">仕様書</h2> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">仕様書</th> - <th scope="col">状態</th> - <th scope="col">備考</th> - </tr> - </thead> - <tbody> - <tr> - <td>{{SpecName('CSS4 Media Queries', '#width', 'width')}}</td> - <td>{{Spec2('CSS4 Media Queries')}}</td> - <td>値に負の数を取ることができるようになり、この場合は false と計算されます。</td> - </tr> - <tr> - <td>{{SpecName('CSS3 Media Queries', '#width', 'width')}}</td> - <td>{{Spec2('CSS3 Media Queries')}}</td> - <td>初回定義。値は非負でなければなりませんでした。</td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの対応</h2> - -<p>{{Compat("css.at-rules.media.width")}}</p> |
