inset-block-end

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

試してみましょう

構文

css
/* <length> 値 */
inset-block-end: 3px;
inset-block-end: 2.4em;

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

/* キーワード値 */
inset-block-end: auto;

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

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

公式定義

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

形式文法

inset-block-end = 
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-rl;
  position: relative;
  inset-block-end: 20px;
  background-color: #c8c800;
}

結果

仕様書

Specification
CSS Logical Properties and Values Level 1
# position-properties

ブラウザーの互換性

BCD tables only load in the browser

関連情報