在我的网站上我的字体似乎没有加载。我在我的代码中添加了abel字体系列。这是我尝试过的一段摘录。
<p style="margin-left: 620px; margin-top: -355px;"
<span style="font-family: 'font-family: 'Abel', sans-serif; font-size: 16px;">Random</span>
</p>
我尝试过很多东西,包括css,似乎没什么用。我知道这是一个简单的概念,但我想知道如何解决它。我正在使用bootstrap,如果它似乎可能会导致问题,请告诉我。
感谢
答案 0 :(得分:0)
尝试:
<span style="font-family: 'Abel', sans-serif; font-size: 16px;">Random</span>
答案 1 :(得分:0)
我把风格放在&lt; p为H.标记不是span标记,我在过去尝试过这个问题。 另外,作为替代方案,可能希望将您的样式放在外部CSS文件中,只创建一个分配给p标签的类:) 外在将使你的生活更轻松
答案 2 :(得分:0)
您必须通过css:
加载字体的服务器路径查看此信息,了解如何操作http://www.newvibe.ca/92weblessons
@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 */
}
希望这会对你有帮助;)