简体   繁体   English

当我突破767px宽度时,Bootstrap 3删除了填充/边距

[英]Bootstrap 3 removes padding/margin when I break under 767px width

When you look at that pen: http://codepen.io/helloworld/pen/eNpBdb 当您看那支笔时: http : //codepen.io/helloworld/pen/eNpBdb

where I use bootstrap 3 css cdn attached. 我在这里使用bootstrap 3 CSS CDN。

<div class="container">
<div class="row">
    <ul style="background:orange;" class="nav navbar-nav">
        <li><a title="" href="http://test.com/en/deu/disclaimer/imprint.html" target="_self">disclaimer</a>
        </li>
        <li><a title="" href="http://test.com/en/deu/disclaimer/imprint.html#!/content=privacy" target="_self">Datenschutz</a>
        </li>
        <li><a title="" href="http://test.com/en/deu/disclaimer/site-map.html" target="_self">Sitemap</a>
        </li>
        <li><a title="" href="http://test.com/en/deu/disclaimer/contact.html" target="_self">Kontakt</a>
        </li>
    </ul>
</div>

When I resize my browser window to under 767px in width, why does the left margin/padding/space of the disclaimer hyperlink and all other 3 hyperlinks disappear? 当我将浏览器窗口的大小调整为小于767px时,为什么免责声明超链接和所有其他3个超链接的左侧边距/填充/空格消失了?

Who removes that space? 谁删除那个空间? I need them as it looks very bad on small devices. 我需要它们,因为在小型设备上看起来非常糟糕。

The row class has row类有

margin-left: -15px;
margin-right: -15px

The child column items have their own padding them. 子列项目有其自己的填充。
This is meant to line up with the container that has 这意味着与排队container

margin-left: 15px;
marign-right: 15px;

Solution: Remove the row class, or use the column-xs-12 class for your child element. 解决方案:删除row类,或对您的子元素使用column-xs-12类。

您正在使用“容器”,“行”,“导航”,“导航栏-导航”的类都是引导程序中的所有类,因为引导程序是为响应浏览器调整大小而构建的,因此它将尝试使较小的设备(电话)更容易使用,平板电脑等),可以通过在bootstrap include下添加自定义css文件并将某些属性设置为!important来克服。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 宽度小于767像素时如何从DIV中删除左边界 - How to remove left margin from DIV when below 767px width 响应式Twitter引导程序: <body> 当宽度&lt;767 / 768px时,会出现导航栏右边距/边距 - Responsive Twitter bootstrap : <body> and navbar right padding/margin appears when width is < 767/768px 最大宽度设置为767px时的媒体查询 - Media query when max-width is set to 767px 屏幕两侧的Bootstrap2 20px填充在767px及以下 - Bootstrap2 20px padding on both-sides of screen at 767px and below Twitter Bootstrap:如何不将列缩放到767px以下的单行 - Twitter Bootstrap: how to not scale columns to single row under 767px 如何使用媒体查询的最大宽度:首先使用Bootstrap 4移动版的767px - How to use media query for max-width: 767px using Bootstrap 4 mobile first @media(最大宽度:767像素){/ * content * /}不起作用 - @media (max-width: 767px) { /*content*/} does not work 对象标签不适用于@media(最大宽度:767像素) - Object tag is not working on @media (max-width: 767px) 宽度大于767像素,启用插件? - javascript - enable a plugin if width is greater than 767px? JavaScript中屏幕分辨率小于767px时的addClass - addClass when the screen resolution is less than 767px in JavaScript
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM