【发布时间】:2018-11-10 21:54:03
【问题描述】:
有没有办法禁用和重写,或覆盖 Bootstrap 4 的颜色主题从 cdn 加载时?
本质上,我是在我的 html 中查看元素,例如 <span class="btn btn-primary">My RED Button</span>
map-remove 不起作用,因为我无法访问 $theme-colors。它在 CDN 源中:
$theme-colors: map-remove($theme-colors, "success", "info", "danger", "primary");
$primary: red !default; 可以,但这只会影响我自己创建的类。
使用 !default 添加$theme-colors (primary: red) !default 也无效。
有一个discussion about this,但据我了解,它不适用于从 CDN 加载的引导程序。
我真的不喜欢为了获得正确的颜色而重写每个引导程序类,我真的不喜欢在本地加载引导程序。
【问题讨论】:
-
您不能使用 SCSS,但您可以使用自定义 CSS 覆盖某些颜色。
-
您是在使用 SASS 编译器.. 还是说您只想使用 CSS?
-
@ZimSystem,“在 CDN 上引用 bootstrap.min.css”是什么意思?你能给出详细的答案来解释你的解决方案吗?
标签: twitter-bootstrap sass bootstrap-4