gpt4 book ai didi

css - Susy:在断点处覆盖 bleed()

转载 作者:行者123 更新时间:2023-11-28 04:50:50 31 4
gpt4 key购买 nike

如何在较小的断点处撤消 bleed-x() 混合,以便示例 2 中的 box4(黄色框)返回到紫色列之间并且不会换行到下一行。

 .story4 {
@include bleed-x();
@include span(2);
background: yellow;
height: 80px;
@include breakpoint($small) {
@include span(8 last);
}
}

代码笔: http://codepen.io/meijioro/pen/aBdWyO

最佳答案

出血是负边距和正填充的组合。将两者都重置为 0 以覆盖:

@include breakpoint($small) {
@include span(8 last);
margin: 0;
padding: 0;
}

一般来说,我尽量通过限制原始应用程序来避免断点覆盖。更像这样:

.story4 {
@include span(2);
background: yellow;
height: 80px;

// use your own tools to create max-width breakpoints...
// this limits the bleed, so we don't have to override it later.
@media (max-width: $small) {
@include bleed-x();
}

@include breakpoint($small) {
@include span(8 last);
}
}

关于css - Susy:在断点处覆盖 bleed(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40711922/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com