aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/css/@media/resolution/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/css/@media/resolution/index.html
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/ja/web/css/@media/resolution/index.html')
-rw-r--r--files/ja/web/css/@media/resolution/index.html85
1 files changed, 85 insertions, 0 deletions
diff --git a/files/ja/web/css/@media/resolution/index.html b/files/ja/web/css/@media/resolution/index.html
new file mode 100644
index 0000000000..b71f0311f8
--- /dev/null
+++ b/files/ja/web/css/@media/resolution/index.html
@@ -0,0 +1,85 @@
+---
+title: resolution
+slug: Web/CSS/@media/resolution
+tags:
+ - '@media'
+ - CSS
+ - Media Queries
+ - Reference
+ - media feature
+ - メディアクエリ
+ - メディア特性
+translation_of: Web/CSS/@media/resolution
+---
+<div>{{cssref}}</div>
+
+<p><strong><code>resolution</code></strong> は <a href="/ja/docs/Web/CSS">CSS</a> の<a href="/ja/docs/Web/CSS/Media_Queries/Using_media_queries#Media_features">メディア特性</a>で、出力端末のピクセル解像度をテストするために使用することができます。</p>
+
+<h2 id="Syntax" name="Syntax">構文</h2>
+
+<p><code>resolution</code> 特性は、出力端末のピクセル解像度を表す {{cssxref("&lt;resolution&gt;")}} 値として指定します。これは範囲の特性であり、つまり接頭辞の付いた <strong><code>min-resolution</code></strong> および <code><strong>max-resolution</strong></code> の変化形を使用して、それぞれ最小値と最大値をクエリすることができます。</p>
+
+<h2 id="Example" name="Example">例</h2>
+
+<h3 id="HTML">HTML</h3>
+
+<pre class="brush: html notranslate">&lt;p&gt;This is a test of your device's pixel density.&lt;/p&gt;
+</pre>
+
+<h3 id="CSS">CSS</h3>
+
+<pre class="brush: css notranslate">/* 正確な解像度 */
+@media (resolution: 150dpi) {
+ p {
+ color: red;
+ }
+}
+
+/* 最小解像度 */
+@media (min-resolution: 72dpi) {
+ p {
+ text-decoration: underline;
+ }
+}
+
+/* 最大解像度 */
+@media (max-resolution: 300dpi) {
+ p {
+ background: yellow;
+ }
+}</pre>
+
+<h3 id="Result" name="Result">結果</h3>
+
+<p>{{EmbedLiveSample("Example")}}</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('CSS3 Media Queries', '#resolution', 'resolution')}}</td>
+ <td>{{Spec2('CSS3 Media Queries')}}</td>
+ <td>初回定義</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>
+
+<p class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</p>
+
+<p>{{Compat("css.at-rules.media.resolution")}}</p>
+
+<h2 id="See_also" name="See_also">関連情報</h2>
+
+<ul>
+ <li>{{domxref("window.devicePixelRatio")}}</li>
+</ul>