css字体引入

2019-05-07  本文已影响0人  时子释

1.使用@font-face{}

@font-face

{

font-family: myFirstFont;

src: url('Sansation_Light.ttf'),

   url('Sansation_Light.eot'); /* IE9 */

}

2.使用中文字体需要.ttf格式

3.使用less定义类

.fontFace(@name,@url){

    @font-face {

        font-family: '@{name}';

        src: url('@{rootFont}@{url}');

    }

}

上一篇下一篇

猜你喜欢

热点阅读