Bootstrap 5 侧边栏粘滞和溢出

发布于 2025-01-13 23:39:22 字数 847 浏览 4 评论 0原文

我正在使用 Bootstarp 5。任何人都可以向我展示布局模板吗?

   <div class="container-fluid">
    <div class="row">
    <div class="col-12 col-md-3">This is side bar</div>
    <div class="col-12 col-md-9">
    <div class="container-fluid">
    <div class="row">
    <div class="col-12 col-lg-3">This is titles of contents</div>
    <div class="col-12 col-lg-9 order-lg-first">This is main content</div>
    </div></div></div>
    </div>
    </div>

在PC中,屏幕左侧应有侧边栏,中间应有主要内容,右侧应有内容标题。在这 3 个 div 中,每个 div 根据其内容都有各自的高度。因此,当一个滚动时,另一个不能随之滚动。与 Bootstrap 在其官方网站中使用的类似。 https://getbootstrap.com/docs/5.1/getting-started/introduction/< /a>

I am using Bootstarp 5. Can anyone show me the layout template?

   <div class="container-fluid">
    <div class="row">
    <div class="col-12 col-md-3">This is side bar</div>
    <div class="col-12 col-md-9">
    <div class="container-fluid">
    <div class="row">
    <div class="col-12 col-lg-3">This is titles of contents</div>
    <div class="col-12 col-lg-9 order-lg-first">This is main content</div>
    </div></div></div>
    </div>
    </div>

In PC, there should be a sidebar in left side of screen and main content in middle and titles of content in right side. In these 3 div, each of them have individual height according to their contents. So, when one is scrolled, the other must not scroll with them. Similar to what Bootstrap uses in its offical website. https://getbootstrap.com/docs/5.1/getting-started/introduction/

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文