【发布时间】:2019-12-14 15:02:47
【问题描述】:
我正在使用引导程序开发 ASP.NET 网站。我想使用卡片列作为布局。我在bootstrap documentation 中阅读了教程。在按钮处,有这样一段代码:
.card-columns {
@include media-breakpoint-only(lg) {
column-count: 4;
}
@include media-breakpoint-only(xl) {
column-count: 5;
}
}
我知道代码是在屏幕大 (lg) 时将列数设置为 4,在屏幕超大 (xl) 时将列数设置为 5。
我的问题是在哪里编写这段代码?我尝试写在 html 头部但不工作。我的页面使用来自 CDN 的引导程序(不是来自本地文件夹)。
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
【问题讨论】:
-
SCSS 文件和其他 CSS 文件一样。所以你必须把它们放在 bootstrapcdn 之类的后面。
-
不行,SASS需要先在服务器上编译成CSS。浏览器不理解 SASS。
标签: html css asp.net twitter-bootstrap bootstrap-4