@mixin font-face($font-family, $file-path, $weight: normal, $style: normal ) { ?@font-face { ? ?font-family: $font-family; ? ?font-weight: $weight; ? ?font-style: $style; ? ?src: url('#{$file-path}.eot'); // 1 ? ?src: url('#{$file-path}.eot?#iefix') ? ? ? ? ? ? ? format('eot'), // 2 ? ? ? ? url('#{$file-path}.svg##{$font-family}') ? ? ?format('svg'), // 3 ? ? ? ? url('#{$file-path}.woff') ? ? ? ? ? ? ? ? ? ? format('woff'), // 4 ? ? ? ? url('#{$file-path}.ttf') ? ? ? ? ? ? ? ? ? ? ?format('truetype'); //5 ?}}比如這種,定義的是css3的字體文件。我想在div的font-family里面使用自己定義的字體要怎么使用例如:div{font-family: @include font-face();? //然后括號(hào)里面?zhèn)鲄?shù)?}
添加回答
舉報(bào)
0/150
提交
取消