【问题标题】:Adding this "hack" to my Bootstrap css将此“hack”添加到我的 Bootstrap css
【发布时间】:2016-12-05 07:59:54
【问题描述】:

我想将此“hack”添加到启用引导的页面 (https://gist.github.com/Jakobud/c057577daddbde4dd709),但是我对 Bootstrap 完全陌生,我不确定在哪里添加代码。我知道在 css 文件夹中我有 bootstrap.min.css 和 bootstrap.css 但如果您单击上面的链接,您会看到它显示为“SASS”,并在第 15 行显示:// 说明:添加以下到 bootstrap.scss 的末尾

我只是使用标准的 Bootstrap,所以我不确定将代码放在哪里!

谢谢!

【问题讨论】:

  • 代码明确指出“SASS”,它不是 CSS。它更像是对如何生成 CSS 的程序的说明。因此,没有解析器就不能直接使用它。
  • @DanielCheung:我已经在 UnluckyForSome 的回答中包含了编译和缩小的 css 文件,以防他坚持编译。

标签: twitter-bootstrap responsive-design column-width css-hack


【解决方案1】:

下载Bootstrap with sass

然后按照这个Tutorial的指示

注意:在编译之前,添加您的自定义 sass 文件。

为了您的帮助,我已经使用您的自定义 sass 文件编译了最新的引导程序。在下方下载已编译的缩小版。

bootstrap.sass.min.css

【讨论】:

  • 如何在不安装 SASS 的情况下添加它?我宁愿只使用普通的引导 css!
  • 你不能因为那个脚本有一些依赖。除非您已经拥有该文件的编译版本。你可以尝试一些在线编译器,比如sassmeister,但是你必须做很多工作才能找到依赖项并将它们提供给你的脚本进行编译。
  • 哦,我明白了,如果我将 $'s 更改为 @'s,我可以使用 LESS 吗?那将更容易实现。感谢您的帮助:-)
  • 不,Variables: from: $, to: @ Mixins: from: @mixin and @include, to: . Import statements: cleaned up, but see below. Remove all SASS !default declarations Replace adjust-hue with spin Replace fade-in with fadein A ton of other "one-off" stuff
猜你喜欢
  • 2012-08-03
  • 1970-01-01
  • 2014-08-10
  • 1970-01-01
  • 2020-06-19
  • 1970-01-01
  • 1970-01-01
  • 2018-07-13
  • 1970-01-01
相关资源
最近更新 更多