我有一个myshopify网站,我试图使用@font-face
显示字体..但由于某种原因,字体没有生效..这里是我的:@ font-face在网站上显示不正确
字体文件:
@font-face {
font-family: 'LeagueGothicRegular';
src: url('{{ 'League_Gothic-webfont.eot' | asset_url }}');
src: url('{{ 'League_Gothic-webfont.eot?iefix' | asset_url }}') format('embedded-opentype'),
url({{ 'League_Gothic-webfont.woff' | asset_url }}) format('woff'),
url('{{ 'League_Gothic-webfont.ttf' | asset_url }}') format('truetype'),
url('{{ 'League_Gothic-webfont.svg#LeagueGothicRegular' | asset_url }}') format('svg');
font-weight: normal;
font-style: normal;
}
..
#top-menu a{
font-family: 'LeagueGothicRegular', sans-serif;
background-color: #fff;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
color: #000000;
display: inline-block;
font-size: 1.97em;
line-height: 1;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
padding: 6px 18px;
padding-top: 8px;
text-decoration: none
}
什么蹦出来? THANKYOU!
谢谢..但唉,没有解决它.. grrr – user1833002
您的CSS文件保存为.liquid扩展名?根据[this](http://ecommerce.shopify.com/c/ecommerce-design/t/css-disregards-liquid-tags-115513),Shipify可能需要知道解析文件。 –
是的,唉,这是.. – user1833002