如何设置一个 bootstrap 的 12 列网格,宽度为 960px,但行宽为 1280?
How can I set up a bootstrap grid of 12 columns with a width of 960px but have rows being 1280 wide?
如何为 12 列设置一个 960px bootstrap 的网格,但每行的宽度为 1280px,因此只有行背景 images/colors 的宽度为 1280px,并且在其两侧都有填充160 像素 (1280-960 / 2)?
如果您使用 bootstrap 框架,那么您将在 <div class="container">
之外使用 <div class="row">
容器是宽度在 CSS 中的元素,而行没有宽度,因此它会跨越您拥有的页面的宽度,而内容将包含在容器中.
来自 bootstrap CSS :
@media (min-width: 768px) {
.container {
width: 750px;
}
}
@media (min-width: 992px) {
.container {
width: 970px;
}
}
@media (min-width: 1200px) {
.container {
width: 1170px;
}
}
如何为 12 列设置一个 960px bootstrap 的网格,但每行的宽度为 1280px,因此只有行背景 images/colors 的宽度为 1280px,并且在其两侧都有填充160 像素 (1280-960 / 2)?
如果您使用 bootstrap 框架,那么您将在 <div class="container">
<div class="row">
容器是宽度在 CSS 中的元素,而行没有宽度,因此它会跨越您拥有的页面的宽度,而内容将包含在容器中.
来自 bootstrap CSS :
@media (min-width: 768px) {
.container {
width: 750px;
}
}
@media (min-width: 992px) {
.container {
width: 970px;
}
}
@media (min-width: 1200px) {
.container {
width: 1170px;
}
}