我正在尝试使用一种名为neontubes
的字体,并具有以下已导入并放在WordPress样式CSS中的代码。
@font-face {
font-family: 'neontubes';
src: url('https://bitbucket.org/kennethjensen/webfonts/raw/fc13c1cb430a0e9462da56fe3f421ff7af72db71/neontubes/neontubes-webfont.eot');
src: url('https://bitbucket.org/kennethjensen/webfonts/raw/fc13c1cb430a0e9462da56fe3f421ff7af72db71/neontubes/neontubes-webfont.eot?#iefix') format('embedded-opentype'),
url('https://bitbucket.org/kennethjensen/webfonts/raw/fc13c1cb430a0e9462da56fe3f421ff7af72db71/neontubes/neontubes-webfont.woff2') format('woff2'),
url('https://bitbucket.org/kenneth jensen/webfonts/raw/fc13c1cb430a0e9462da56fe3f421ff7af72db71/neontubes/neontubes-webfont.woff') format('woff'),
url('https://bitbucket.org/kennethjensen/webfonts/raw/fc13c1cb430a0e9462da56fe3f421ff7af72db71/neontubes/neontubes-webfont.ttf')
然后,我尝试使用div类进行样式设置。
.event {font-family: neontubes;}
没啥事儿?
最佳答案
尝试在您的第一个URL之后删除分号。另外,您不能具有多个src属性。这是一个例子:
@font-face {
font-family: ProximaNovaLight;
src: url("/Portals/0/Fonts/ProximaNova-Light.woff") format("woff"), url("/Portals/0/Fonts/ProximaNova-Light.ttf") format("truetype");
}