作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
不确定为什么我的 div 元素没有跨越我的波旁网格的整个宽度。该过程仅发生在最后两个 div 上。 看图片。为什么它会这样?在 codepen 上遇到类似问题.为什么 div 元素没有占据整个网格?
HTML
<div class="main-container">
<div class="articles">
<article></article>
<article></article>
<article></article>
<article></article>
<article></article>
</div>
</div>
CSS
.articles{
@include outer-container;
article {
margin-bottom: 50px;
border-bottom: 1px solid $lightest-grey;
img{
width: 100%;
height: auto;
}
span{
color: $light-grey;
}
}
}
@include media ($tablet) {
article{
@include span-columns(3 of 6);
}
}
解决方案:我必须添加 @include omega(2n)
。我不确定这是否是一个好方法,但现在就足够了。
最佳答案
刚刚欧米茄
Removes the element's gutter margin, regardless of its position in thegrid hierarchy or display property. It can target a specific element,or every nth-child occurrence. Works only with block layouts.
尝试从元素中移除装订线边距。不要忘记 body
元素的边距。
关于html - Div 元素不跨越 Bourbon 整齐网格的全宽,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37635722/
我是一名优秀的程序员,十分优秀!