0

我有自己用于网站的自定义字体,我希望它被声明为 $baseFontFamily 唯一的问题是,由于它是自定义字体,我希望旧版浏览器回退到默认的 twitter bootstrap 字体系列. 有什么办法可以做到吗?

我的主要 .scss 文件如下所示:

@font-face
{
  font-family: Bartley;
  src: url('/Bartley.ttf');
}

$baseFontFamily: Bartley, $sansFontFamily;

@import "bootstrap";

body { 
  padding-top: 60px;
}

@import "bootstrap-responsive";

谢谢!

4

1 回答 1

4

没有“默认引导字体”,但它应该像这样工作:

$baseFontFamily: 'Bartley', Helvetica, Arial, sans-serif !default;

然后你可以做...

$sansFontFamily: $baseFontFamily; // Set "SansFontFamily" with value from "baseFontFamily"
于 2012-10-11T11:34:12.143 回答