加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

bootstrap-4 – 在导航栏中使用.container会缩小显示范围

发布时间:2020-12-18 00:14:07 所属栏目:安全 来源:网络整理
导读:bootstrap v4-alpha文档显示 you can use .container inside the navbar to have a centered (non-fluid) content. 但是,这似乎无法在超小型显示器上正常工作,因为.container盒缩小太小,因此徽标和菜单按钮相互堆叠. 这是显示问题的a JSFiddle example. 解决
bootstrap v4-alpha文档显示 you can use .container inside the navbar to have a centered (non-fluid) content.

但是,这似乎无法在超小型显示器上正常工作,因为.container盒缩小太小,因此徽标和菜单按钮相互堆叠.

这是显示问题的a JSFiddle example.

解决方法

目前在alpha 6 there is a bug中,导航栏内的容器在小屏幕上收缩宽度.这将在测试版中修复,但在此之前,您只需要一点CSS来保持内部容器在移动设备上的全宽.
@media (max-width:767px) {
    .container {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读