我只是困惑为什么我的 CSS 代码不起作用。 我在这个元素中使用 codeigniter。
我有一个名为“Viner Hand ITC”的字体,我将所有格式放在我的根目录中,并带有一个名为“font”的子文件夹,但它不起作用。
看看这个。
@font-face {
font-family: "Viner Hand ITC";
src: url('font/435028077-27990.eot');
src: url('font/435028077-27990.eot?#iefix') format('embedded-opentype'),
url('font/435028077-27990.svg#Viner Hand ITC') format('svg'),
url('font/435028077-27990.woff') format('woff'),
url('font/435028077-27990.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
body {
background : #000!important;
color: #fff;
text-align: justify;
font-family: "Viner Hand ITC"!important;
direction: ltr;
}
但是当我打开我的页面时,它总是使用默认字体..
最佳答案
许多浏览器不支持具有 src 属性的字体系列。检查您的浏览器。
关于php - @Font-Face 在 codeigniter 中不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24946871/