inset-inline-start

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2021.

* Some parts of this feature may have varying levels of support.

inset-inline-startCSS のプロパティで、要素における行頭からの論理的な内部位置を定義し、要素の書字方向やテキストの向きに従って物理的なオフセットに対応付けられます。 top, right, bottom, left のいずれかのプロパティに、 writing-mode, direction, text-orientation で定義された値に従って対応します。

試してみましょう

構文

css
/* <length> 値 */
inset-inline-start: 3px;
inset-inline-start: 2.4em;

/* 包含ブロックの幅または高さに対する <percentage> 値 */
inset-inline-start: 10%;

/* キーワード値 */
inset-inline-start: auto;

/* グローバル値 */
inset-inline-start: inherit;
inset-inline-start: initial;
inset-inline-start: revert;
inset-inline-start: revert-layer;
inset-inline-start: unset;

inset-inline-startinset-inline-end の一括指定は inset-inline です。

inset-inline-start プロパティは left プロパティと同じ値を取ります。

公式定義

初期値auto
適用対象位置指定要素
継承なし
パーセント値包含ブロックの論理的な幅
計算値方向が論理的である以外はボックスのオフセット、 top, right, bottom, left と同じ
アニメーションの種類length または パーセント値, calc();

形式文法

inset-inline-start = 
auto |
<length-percentage>

<length-percentage> =
<length> |
<percentage>

インライン方向の先頭のオフセットの設定

HTML

html
<div>
  <p class="exampleText">テキストの例</p>
</div>

CSS

css
div {
  background-color: yellow;
  width: 120px;
  height: 120px;
}

.exampleText {
  writing-mode: vertical-lr;
  position: relative;
  inset-inline-start: 20px;
  background-color: #c8c800;
}

結果

仕様書

Specification
CSS Logical Properties and Values Level 1
# propdef-inset-inline-start
CSS Positioned Layout Module Level 3
# propdef-inset-inline-start

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
inset-inline-start
anchor()
Experimental
anchor-size()
Experimental
auto

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
In development. Supported in a pre-release version.
In development. Supported in a pre-release version.
No support
No support
Experimental. Expect behavior to change in the future.
See implementation notes.
Uses a non-standard name.
Has more compatibility info.

関連情報