Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
字体不使用html加载_Html_Css_Twitter Bootstrap 3 - Fatal编程技术网

字体不使用html加载

字体不使用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

在我的网站上,我的字体似乎没有加载。我在代码中添加了abel字体系列。下面是我尝试过的一个片段

<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 */
}