Google字体无法与引导程序一起使用 [英] Google font not working with bootstrap
本文介绍了Google字体无法与引导程序一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在网页上使用Google字体。在我的html我使用:
I'm trying to use Google Font on a page. In my html I used:
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,600' rel='stylesheet' type='text/css'>
在我的CSS中:
@import url('http://fonts.googleapis.com/css?family=Open+Sans');
仍然当我使用Open Sans与font-family属性保持在Arial。
Still whenI use "Open Sans" with the font-family attribute it stays on Arial.
body
{
background-color: #F1F1F2;
font-family: "Open Sans", Arial;
}
推荐答案
如果您不使用Google字体提供的直接代码,您只需加载以下网址:
If you don't use the direct code that Google font delivers and you simply load the following url:
您会代表源代码(CSS)。
You'd be represented the source code (CSS).
现在,将显示的代码复制并粘贴到您网站的CSS源代码中。
Now, copy and paste the displayed code in the CSS source of your website.
然后,您可以使用以下选项在您的网页上使用所选的google字体:
You can then use your selected google font(s) on your webpages using the following:
body
{
background-color: #F1F1F2;
font-family: 'Open Sans', Arial;
}
这样就可以了。
这篇关于Google字体无法与引导程序一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文