【发布时间】:2014-06-09 11:30:39
【问题描述】:
Atm 我正在使用 col-lg、col-md、col-sm 和 col-xs
我猜 col-xs 的宽度设置为 768px。
我怎样才能创建一个新的 col-xxs 或更小的东西,例如。宽度 480px ?
【问题讨论】:
标签: css twitter-bootstrap responsive-design grid-system
Atm 我正在使用 col-lg、col-md、col-sm 和 col-xs
我猜 col-xs 的宽度设置为 768px。
我怎样才能创建一个新的 col-xxs 或更小的东西,例如。宽度 480px ?
【问题讨论】:
标签: css twitter-bootstrap responsive-design grid-system
您可以使用以下方法来完成此操作。我个人在我的项目中链接到 bootstrap CDN 并保留一个本地版本的 bootstrap,这样我就可以针对我的站点特定样式利用它的 mixin,我将在其中放置以下内容...
@media (max-width: $screen-xs-min) {
@include make-grid(xxs);
}
【讨论】:
.hidden-xxs 和.visible-xxs 使用make 类吗?
不幸的是,@4dgaurav 的回答不足以在使用 Bootstrap 的 LESS 源代码时引入新的断点。还有更多代码可以覆盖变量。
如果你使用 LESS,你可以使用这两个额外的断点(经过测试!):https://github.com/brgrz/bootstrap-breakpoints
HTH
【讨论】:
只是有完全相同的需求,并想知道为什么我以前从未有过。这是一个相当深入的讨论;
https://github.com/twbs/bootstrap/issues/10203
我发现这里最有用的要点来自 Jakobud;
https://github.com/twbs/bootstrap/issues/10203/#issuecomment-42162250
要点;
SCSS:https://gist.github.com/Jakobud/c057577daddbde4dd709
少:https://gist.github.com/wdollar/135ec3c80faaf5a821b0
LESS 版本我不能说,我用的是 Sass 版本,非常棒。
【讨论】: