Bootstrap5 Offcanvas

半兽人 发表于: 2021-04-23   最后更新时间: 2021-04-23 13:19:06  
{{totalSubscript}} 订阅,158 游览

Examples

Offcanvas components

Below is an offcanvas example that is shown by default (via .show on .offcanvas). Offcanvas includes support for a header with a close button and an optional body class for some initial padding. We suggest that you include offcanvas headers with dismiss actions whenever possible, or provide an explicit dismiss action.

<div class="offcanvas offcanvas-start show" tabindex="-1" id="offcanvas" aria-labelledby="offcanvasLabel" data-bs-backdrop="false" data-bs-scroll="true">
  <div class="offcanvas-header">
    <h5 class="offcanvas-title" id="offcanvasLabel">Offcanvas</h5>
    <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
  </div>
  <div class="offcanvas-body">
    Content for the offcanvas goes here. You can place just about any Bootstrap component or custom elements here.
  </div>
</div>

在线运行



您需要解锁本帖隐藏内容请: 点击这里
本帖隐藏的内容


上一条: bootstrap5文本省略点击显示全部
下一条: 已经是最后了!

提问