我正在使用 Bootstrap 开发 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 head 部分但不起作用。我的页面使用来自 CDN 的 Bootstrap (而不是来自本地文件夹)。
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
最佳答案
需要在visual studio中安装SCSS编译器,编译scss文件后得到.css代码。
问候。
关于html - 在 Bootstrap 4 中编写自定义 SCSS 的位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57386541/