aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/css/object-position
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/object-position
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/object-position')
-rw-r--r--files/ja/web/css/object-position/index.html119
1 files changed, 119 insertions, 0 deletions
diff --git a/files/ja/web/css/object-position/index.html b/files/ja/web/css/object-position/index.html
new file mode 100644
index 0000000000..c52de24924
--- /dev/null
+++ b/files/ja/web/css/object-position/index.html
@@ -0,0 +1,119 @@
+---
+title: object-position
+slug: Web/CSS/object-position
+tags:
+ - CSS
+ - CSS Image
+ - CSS Property
+ - Reference
+translation_of: Web/CSS/object-position
+---
+<div>{{CSSRef}}</div>
+
+<p><strong><code>object-position</code></strong> プロパティは、ボックス内における置換要素の配置を指定します。Areas of the box which aren't covered by the replaced element's object will show the element's background.</p>
+
+<p>You can adjust how the replaced element's object's intrinsic size (that is, its natural size) is adjusted to fit within the element's box using the {{cssxref("object-fit")}} property.</p>
+
+<div>{{EmbedInteractiveExample("pages/css/object-position.html")}}</div>
+
+
+
+<p>{{cssinfo}}</p>
+
+<h2 id="Syntax" name="Syntax">構文</h2>
+
+<pre class="brush:css">/* &lt;position&gt; 値 */
+object-position: center top;
+object-position: 100px 50px;
+
+/* グローバル値 */
+object-position: inherit;
+object-position: initial;
+object-position: unset;
+</pre>
+
+<h3 id="Values" name="Values">値</h3>
+
+<dl>
+ <dt><code>&lt;position&gt;</code></dt>
+ <dd>要素のボックスの端に対する 2D 上の位置を表す、1 個から 4 個の値による {{cssxref("&lt;position&gt;")}} です。相対値または絶対値のオフセットを指定できます。また、要素のボックスの外側の位置も指定できます。</dd>
+</dl>
+
+<div class="blockIndicator note">
+<p><strong>注:</strong> 要素がボックス外にはみ出る位置も指定できます。</p>
+</div>
+
+<h3 id="Formal_syntax" name="Formal_syntax">形式文法</h3>
+
+<pre class="syntaxbox">{{csssyntax}}</pre>
+
+<h2 id="Example" name="Example">例</h2>
+
+<h3 id="HTML_Content" name="HTML_Content">HTML コンテンツ</h3>
+
+<pre class="brush: html">&lt;img id="object-position-1" src="https://mdn.mozillademos.org/files/6457/mdn_logo_only_color.png" alt="MDN Logo"/&gt;
+&lt;img id="object-position-2" src="https://mdn.mozillademos.org/files/6457/mdn_logo_only_color.png" alt="MDN Logo"/&gt;
+</pre>
+
+<h3 id="CSS_Content" name="CSS_Content">CSS コンテンツ</h3>
+
+<pre class="brush: css">img {
+ width: 150px;
+ height: 100px;
+  border: 1px solid #000;
+ background-color: yellow;
+ margin-right: 1em;
+}
+
+#object-position-1 {
+ object-position: 10px;
+}
+
+#object-position-2 {
+ object-position: 20% 10%;
+}
+</pre>
+
+<p>The first image is positioned with its left edge inset 10 pixels from the left edge of the element's box. The second image is positioned with its right edge flush against the right edge of the element's box and is located 10% of the way down the height of the element's box.</p>
+
+<h3 id="Output" name="Output">出力</h3>
+
+<p>{{EmbedLiveSample('Example', '100%','300px' )}}</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 Images', '#the-object-position', 'object-position')}}</td>
+ <td>{{Spec2('CSS4 Images')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('CSS3 Images', '#the-object-position', 'object-position')}}</td>
+ <td>{{Spec2('CSS3 Images')}}</td>
+ <td>最初期の定義</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザ実装状況</h2>
+
+<div>
+
+
+<p>{{Compat("css.properties.object-position")}}</p>
+</div>
+
+<h2 id="See_also" name="See_also">関連情報</h2>
+
+<ul>
+ <li>ほかの画像関連 CSS プロパティ: {{cssxref("object-fit")}}, {{cssxref("image-orientation")}}, {{cssxref("image-rendering")}}, {{cssxref("image-resolution")}}.</li>
+</ul>