sah*_*mba 2 css mobile google-font-api
我想在我的网页http://iconablare.in/iconablareredesign上使用Google font Six Cap
它在桌面上运行完美,但它不会在整个网站的移动设备上加载但是当我尝试使用该字体制作新的html文件时
http://iconablare.in/iconablareredesign/style.css它可以在网络和移动设备上完全加载,任何人都可以帮忙吗?
我在两个文件中使用相同的代码.
Mar*_*hem 10
如果你可以尝试在标题中包含你的谷歌字体链接脚本,而不是像你这样在你的CSS中导入它:
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
Run Code Online (Sandbox Code Playgroud)
而不是这个:
@import url(http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300);
Run Code Online (Sandbox Code Playgroud)
并尝试看看是否有效,
无论如何,如果您的标题无法访问或者您坚持在css中导入它,请确保@import代码行是第一行文件,如下所示:
@import url(http://fonts.googleapis.com/css?family=Six+Caps);
@import url(http://fonts.googleapis.com/css?family=Marcellus+SC);
@import url(http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300);
img, object, embed, video {
max-width: 100%;
}
/* IE 6 does not support max-width so default to width 100% */
.ie6 img {
width:100%;
}
Run Code Online (Sandbox Code Playgroud)
而不是这个:
@charset "utf-8";
/* Simple fluid media
Note: Fluid media requires that you remove the media's height and width attributes from the HTML
http://www.alistapart.com/articles/fluid-images/
*/
img, object, embed, video {
max-width: 100%;
}
/* IE 6 does not support max-width so default to width 100% */
.ie6 img {
width:100%;
}
@import url(http://fonts.googleapis.com/css?family=Six+Caps);
@import url(http://fonts.googleapis.com/css?family=Marcellus+SC);
@import url(http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300);
Run Code Online (Sandbox Code Playgroud)
(此处还讨论了:如何在CSS文件中导入Google Web字体?)