字体不使用html加载
在我的网站上,我的字体似乎没有加载。我在代码中添加了abel字体系列。下面是我尝试过的一个片段字体不使用html加载,html,css,twitter-bootstrap-3,Html,Css,Twitter Bootstrap 3,在我的网站上,我的字体似乎没有加载。我在代码中添加了abel字体系列。下面是我尝试过的一个片段 <p style="margin-left: 620px; margin-top: -355px;" <span style="font-family: 'font-family: 'Abel', sans-serif; font-size: 16px;">Random</span> </p> 试试: 随机 我会将样式放在标记上,而不是spa
<p style="margin-left: 620px; margin-top: -355px;"
<span style="font-family: 'font-family: 'Abel', sans-serif; font-size: 16px;">Random</span>
</p>
试试:
随机
我会将样式放在标记上,而不是span标记上,我过去在尝试这样做时遇到过问题。
另外,您可能希望将样式放在外部CSS文件中,并创建一个分配给p标记的类:)
外部将使您的生活更加轻松您必须通过css加载字体的服务器路径:
查看此帖子,了解如何操作
希望这对您有所帮助;) 您有“
和”
,这可能使css不可能正确。。。例如,第一个字符串是“font-family:”
我会仔细考虑一下,然后用引号切磋一下,看看这是否有帮助。您可能不需要在Abel
周围加上,
引号,但在该行中加两次字体系列:
也无济于事。以防万一。。。像这样试试-Random
你能试着把页面上的内容摘要放在这里吗,以防链接掉下来?谢谢
<span style="font-family: 'Abel', sans-serif; font-size: 16px;">Random</span>
@font-face {
font-family: 'Bebas Neue';
src: url('http://www.example.com/css/font/BebasNeue.eot'); /* IE9 Compat Modes */
src: url('http://www.example.com/css/font/BebasNeue.eot?#iefix') format('embedded-
opentype'), /* IE6-IE8 */
url('http://www.example.com/css/font/BebasNeue.woff') format('woff'), /* Modern
Browsers */
url('http://www.example.com/css/font/BebasNeue.ttf') format('truetype'), /* Safari,
Android, iOS */
url('http://www.example.com/css/font/BebasNeue.svg#svgFontName') format('svg'); /*
Legacy iOS */
}