Skip to main content Skip to docs navigation

ポジション Position

これらのヘルパーを使用して、要素の位置を素早く設定します。

固定トップ

要素をビューポートの上部に、端から端まで配置します。プロジェクトでfixed positionの影響を理解していることを確認してください。追加のCSSが必要になる場合があります。

<div class="fixed-top">...</div>

固定ボトム

要素をビューポートの下部に、端から端まで配置します。プロジェクトでfixed positionの影響を理解していることを確認してください。追加のCSSが必要になる場合があります。

<div class="fixed-bottom">...</div>

スティッキートップ

要素をビューポートの上部に、端から端まで配置しますが、スクロールして通過した後にのみ適用されます。

<div class="sticky-top">...</div>

レスポンシブスティッキートップ

.sticky-topユーティリティにはレスポンシブなバリエーションも存在します。

<div class="sticky-sm-top">Stick to the top on viewports sized SM (small) or wider</div>
<div class="sticky-md-top">Stick to the top on viewports sized MD (medium) or wider</div>
<div class="sticky-lg-top">Stick to the top on viewports sized LG (large) or wider</div>
<div class="sticky-xl-top">Stick to the top on viewports sized XL (extra-large) or wider</div>
<div class="sticky-xxl-top">Stick to the top on viewports sized XXL (extra-extra-large) or wider</div>

スティッキーボトム

要素をビューポートの下部に、端から端まで配置しますが、スクロールして通過した後にのみ適用されます。

<div class="sticky-bottom">...</div>

レスポンシブスティッキーボトム

.sticky-bottomユーティリティにはレスポンシブなバリエーションも存在します。

<div class="sticky-sm-bottom">Stick to the bottom on viewports sized SM (small) or wider</div>
<div class="sticky-md-bottom">Stick to the bottom on viewports sized MD (medium) or wider</div>
<div class="sticky-lg-bottom">Stick to the bottom on viewports sized LG (large) or wider</div>
<div class="sticky-xl-bottom">Stick to the bottom on viewports sized XL (extra-large) or wider</div>
<div class="sticky-xxl-bottom">Stick to the bottom on viewports sized XXL (extra-extra-large) or wider</div>