位置
要素の位置をすばやく設定するには、これらのヘルパーを使用します。
このページの内容
上部に固定
要素をビューポートの上部に、端から端まで配置します。プロジェクトにおける固定位置の影響を理解していることを確認してください。追加のCSSを追加する必要がある場合があります。
<div class="fixed-top">...</div>
下部に固定
要素をビューポートの下部に、端から端まで配置します。プロジェクトにおける固定位置の影響を理解していることを確認してください。追加の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>