Sass Compass SCSS字体url配置问题
我用compass sass写下了一个模板,这里字体混合会产生一些问题,因为没有设置web字体Sass Compass SCSS字体url配置问题,sass,compass-sass,Sass,Compass Sass,我用compass sass写下了一个模板,这里字体混合会产生一些问题,因为没有设置web字体 http_path = "/" css_dir = "resources/stylesheets" sass_dir = "resources/stylesheets" images_dir = "resources/images" javascripts_dir = "resources/js" 然后通过使用字体mixin生成输出 @font-face { font-family: "cabi
http_path = "/"
css_dir = "resources/stylesheets"
sass_dir = "resources/stylesheets"
images_dir = "resources/images"
javascripts_dir = "resources/js"
然后通过使用字体mixin生成输出
@font-face {
font-family: "cabinregular";
src: url('resources/stylesheets/fonts/cabin-regular.eot?#iefix') format('embedded-
opentype'), url('resources/stylesheets/fonts/cabin-regular.ttf') format('truetype'),
url('resources/stylesheets/fonts/cabin-regular.woff') format('woff');
}
路径是正确的,但在运行html时字体不会应用
http_path="/somename/"
这是适用的。那么为什么不指定http#u路径它就不能工作?带来src:url(“../font/cab-regular?#iefix”)代码>在主src使工作正常之前
@font-face {
font-family: 'cabinregular';
src: url("../fonts/cabin-regular?#iefix");
src: url("../fonts/cabin-regular?#iefix") format("embedded-opentype"), url("../fonts/cabin-regular") format("woff"), url("../fonts/cabin-regular") format("truetype"), url("../fonts/cabin-regular.svg#cabin-regular") format("svg");
font-weight: normal;
font-style: normal;
}
也许你应该添加字体。例如:fonts_dir=“fonts”或我认为fonts_dir=“resources/fonts”。