--- title: padding-inline-start slug: Web/CSS/padding-inline-start tags: - CSS - CSS Logical Property - CSS Property - Experimental - Reference - padding-inline - padding-inline-start - 'recipe:css-property' translation_of: Web/CSS/padding-inline-start --- <div>{{CSSRef}}</div> <p><strong><code>padding-inline-start</code></strong> は <a href="/ja/docs/Web/CSS">CSS</a> のプロパティで、要素のインライン方向の論理的な先頭側のパディングを定義し、それが要素の書字方向やテキストの方向に応じて物理的なマージンに対応付けられます。</p> <div>{{EmbedInteractiveExample("pages/css/padding-inline-start.html")}}</div> <div class="hidden">このデモのソースファイルは GitHub リポジトリに格納されています。デモプロジェクトに協力したい場合は、 <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> をクローンしてプルリクエストを送信してください。</div> <h2 id="Syntax" name="Syntax">構文</h2> <pre class="brush:css no-line-numbers notranslate">/* <length> 値 */ padding-inline-start: 10px; /* 絶対的な長さ */ padding-inline-start: 1em; /* テキストの大きさに対する相対値 */ /* パーセント値 */ padding-inline-start: 5%; /* ブロックコンテナーの幅に対する割合のパディング */ /* グローバル値 */ padding-inline-start: inherit; padding-inline-start: initial; padding-inline-start: unset; </pre> <h3 id="Values" name="Values">値</h3> <p><code>padding-inline-start</code> プロパティは {{cssxref("padding-left")}} プロパティと同じ値を取ります。</p> <h2 id="Description" name="Description">解説</h2> <p>これは {{cssxref("padding-top")}}, {{cssxref("padding-right")}}, {{cssxref("padding-bottom")}}, {{cssxref("padding-left")}} の何れかのプロパティに対応し、どれに対応するかは {{cssxref("writing-mode")}}, {{cssxref("direction")}}, {{cssxref("text-orientation")}} で定義された値によって決まります。</p> <p>関連プロパティとして、要素の他のマージンを定義する {{cssxref("padding-block-start")}}, {{cssxref("padding-block-end")}}, {{cssxref("padding-inline-end")}} があります。</p> <h2 id="Formal_definition" name="Formal_definition">公式定義</h2> <p>{{cssinfo}}</p> <h2 id="Formal_syntax" name="Formal_syntax">形式文法</h2> {{csssyntax}} <h2 id="Example" name="Example">例</h2> <h3 id="Setting_inline_start_padding_for_vertical_text" name="Setting_inline_start_padding_for_vertical_text">縦書きテキストにおけるインライン方向の先頭のパディングの設定</h3> <h4 id="HTML">HTML</h4> <pre class="brush: html notranslate"><div> <p class="exampleText">Example text</p> </div> </pre> <h4 id="CSS">CSS</h4> <pre class="brush: css notranslate">div { background-color: yellow; width: 120px; height: 120px; } .exampleText { writing-mode: vertical-lr; padding-inline-start: 20px; background-color: #C8C800; }</pre> <h4 id="Result" name="Result">結果</h4> <p>{{EmbedLiveSample("Setting_inline_start_padding_for_vertical_text", 140, 140)}}</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("CSS Logical Properties", "#propdef-padding-inline-start", "padding-inline-start")}}</td> <td>{{Spec2("CSS Logical Properties")}}</td> <td>初回定義</td> </tr> </tbody> </table> <h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2> <p>{{Compat("css.properties.padding-inline-start")}}</p> <h2 id="See_also" name="See_also">関連情報</h2> <ul> <li>対応付け先の物理的なプロパティ: {{cssxref("padding-top")}}, {{cssxref("padding-right")}}, {{cssxref("padding-bottom")}}, {{cssxref("padding-left")}}</li> <li>{{cssxref("writing-mode")}}, {{cssxref("direction")}}, {{cssxref("text-orientation")}}</li> </ul>