为什么这个font-family没有加载ie8和ie7 [英] why this font-family is not loading in ie8 and ie7

查看:114
本文介绍了为什么这个font-family没有加载ie8和ie7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

< link href ='http://fonts.googleapis.com/css?family = Open + Sans:800,700,300,600,400'rel =''stylesheet'type ='text / css'>



<link href='http://fonts.googleapis.com/css?family=Open+Sans:800,700,300,600,400' rel='stylesheet' type='text/css'>

.page_section header div.container h1 {
font-size: 43px;
padding: 0 0 10px 0;
margin: 0;
text-align: center;
color: #00f;
font-weight: 800;
font-family: 'Open Sans', sans-serif;




$在ie10,chrome和firefox中b $ b此代码正常工作,但在ie7和ie8 .i中需要此代码才能工作。

类似明智的font-weight也不适用于ie7和ie8。 。



请帮我解决这个问题。谢谢你



in ie10,chrome and firefox this code is working,but in ie7 and ie8 .i need this code to work.
like wise font-weight is also not applying in both ie7 and ie8..

kindly help me in resolve this .thank you

推荐答案

在某些情况下,你需要添加不同浏览器识别的格式。

在css文件中使用以下CSS加载字体,

In some cases, you need to add the format, that is recognized by the different browsers.
Use following CSS in you css file to load the font,
@font-face {
    font-family: 'MyWebFont';
    src: url('webfont.eot'); /* IE9 Compat Modes */
    src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('webfont.woff') format('woff'), /* Modern Browsers */
         url('webfont.ttf')  format('truetype'), /* Safari, Android, iOS */
         url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
    }

/* Use it */
body {
       font-family: 'MyFontFamily', Fallback, sans-serif;
}





阅读: http://www.iandevlin.com/blog/2009/12/webdev/adventures-with-font-面对 [ ^ ]



-KR



Read this : http://www.iandevlin.com/blog/2009/12/webdev/adventures-with-font-face[^]

-KR


这篇关于为什么这个font-family没有加载ie8和ie7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆