import不工作在Internet

import不工作在Internet

本文介绍了谷歌字体使用@import不工作在Internet Explorer上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿家伙我试图在我的网页上使用谷歌字体,但我有一个与Internet Explorer的问题。
我正在使用@import,当我谷歌我看到人们用这种方式:

  @导入网址('http://fonts.googleapis.com/css?family=Open+Sans'); 

事情是,我得到的链接如下所示:

  @import url(http://fonts.googleapis.com/earlyaccess/opensanshebrew.css); 

当我在IE上打开我的网页时,根本没有文字。 b

我必须获取网络文件吗?或者有没有办法解决这个问题?

解决方案

Hia
我有同样的问题,已经创建了一个新的网页版本的这种字体与IE浏览器很好的工作。
您可以在此下载:

谢谢!
Assaf

在您下载rar中的文件后,添加此css以使用它:

  @ font-face {
font-family:'Open Sans Hebrew';
font-style:italic;
font-weight:300;
src:url(opensanshebrew-lightitalic-webfont.eot);
src:url(opensanshebrew-lightitalic-webfont.eot?#iefix)格式('embedded-opentype'),
url(opensanshebrew-lightitalic-webfont.woff)格式('woff'),
url(opensanshebrew-lightitalic-webfont.ttf)格式('truetype');
}
@ font-face {
font-family:'Open Sans Hebrew';
font-style:normal;
font-weight:300;
src:url(opensanshebrew-light-webfont.eot);
src:url(opensanshebrew-light-webfont.eot?#iefix)格式('embedded-opentype'),
url(opensanshebrew-light-webfont.woff)格式('woff'),
url(opensanshebrew-light-webfont.ttf)格式('truetype');
}
@ font-face {
font-family:'Open Sans Hebrew';
font-style:italic;
font-weight:400;
src:url(opensanshebrew-italic-webfont.eot);
src:url(opensanshebrew-italic-webfont.eot?#iefix)format('embedded-opentype'),
url(opensanshebrew-italic-webfont.woff)format('woff'),
url(opensanshebrew-italic-webfont.ttf)格式('truetype');
}
@ font-face {
font-family:'Open Sans Hebrew';
font-style:normal;
font-weight:400;
src:url(opensanshebrew-regular-webfont.eot);
src:url(opensanshebrew-regular-webfont.eot?#iefix)格式('embedded-opentype'),
url(opensanshebrew-regular-webfont.woff)格式('woff'),
url(opensanshebrew-regular-webfont.ttf)格式('truetype');
}
@ font-face {
font-family:'Open Sans Hebrew';
font-style:italic;
font-weight:700;
src:url(opensanshebrew-bolditalic-webfont.eot);
src:url(opensanshebrew-bolditalic-webfont.eot?#iefix)format('embedded-opentype'),
url(opensanshebrew-bolditalic-webfont.woff)format('woff'),
url(opensanshebrew-bolditalic-webfont.ttf)格式('truetype');
}
@ font-face {
font-family:'Open Sans Hebrew';
font-style:normal;
font-weight:700;
src:url(opensanshebrew-bold-webfont.eot);
src:url(opensanshebrew-bold-webfont.eot?#iefix)format('embedded-opentype'),
url(opensanshebrew-bold-webfont.woff)format('woff'),
url(opensanshebrew-bold-webfont.ttf)格式('truetype');
}
@ font-face {
font-family:'Open Sans Hebrew';
font-style:italic;
font-weight:800;
src:url(opensanshebrew-extrabold-webfont.eot);
src:url(opensanshebrew-extrabold-webfont.eot?#iefix)format('embedded-opentype'),
url(opensanshebrew-extrabold-webfont.woff)format('woff'),
url(opensanshebrew-extrabold-webfont.ttf)格式('truetype');
}
@ font-face {
font-family:'Open Sans Hebrew';
font-style:normal;
font-weight:800;
src:url(opensanshebrew-extrabold-webfont.eot);
src:url(opensanshebrew-extrabold-webfont.eot?#iefix)format('embedded-opentype'),
url(opensanshebrew-extrabold-webfont.woff)format('woff'),
url(opensanshebrew-extrabold-webfont.ttf)格式('truetype');
}


Hey guys i'm trying to use google fonts on my web but i have an issue with internet explorer.I'm using @import, and when i google it i see that people use it this way:

@import url('http://fonts.googleapis.com/css?family=Open+Sans');

the thing is that the link i got looks like this:

@import url(http://fonts.googleapis.com/earlyaccess/opensanshebrew.css);

when i open my web on IE there is no text at all.

do i have to get the webfont files? or is there a way to fix this?

解决方案

HiaI've had the same issue, so I've created a new web version of this font which works great with IE.You can download it Here:http://assafk.com/staff/open_sans_hebrew/Opes_Sans_Hebrew_Fixed.rarThanks!Assaf

after you download the files in the rar, add this css to use it:

@font-face {
    font-family: 'Open Sans Hebrew';
    font-style: italic;
    font-weight: 300;
    src: url(opensanshebrew-lightitalic-webfont.eot);
    src: url(opensanshebrew-lightitalic-webfont.eot?#iefix) format('embedded-opentype'),
    url(opensanshebrew-lightitalic-webfont.woff) format('woff'),
    url(opensanshebrew-lightitalic-webfont.ttf) format('truetype');
}
@font-face {
    font-family: 'Open Sans Hebrew';
    font-style: normal;
    font-weight: 300;
    src: url(opensanshebrew-light-webfont.eot);
    src: url(opensanshebrew-light-webfont.eot?#iefix) format('embedded-opentype'),
    url(opensanshebrew-light-webfont.woff) format('woff'),
    url(opensanshebrew-light-webfont.ttf) format('truetype');
}
@font-face {
    font-family: 'Open Sans Hebrew';
    font-style: italic;
    font-weight: 400;
    src: url(opensanshebrew-italic-webfont.eot);
    src: url(opensanshebrew-italic-webfont.eot?#iefix) format('embedded-opentype'),
    url(opensanshebrew-italic-webfont.woff) format('woff'),
    url(opensanshebrew-italic-webfont.ttf) format('truetype');
}
@font-face {
    font-family: 'Open Sans Hebrew';
    font-style: normal;
    font-weight: 400;
    src: url(opensanshebrew-regular-webfont.eot);
    src: url(opensanshebrew-regular-webfont.eot?#iefix) format('embedded-opentype'),
    url(opensanshebrew-regular-webfont.woff) format('woff'),
    url(opensanshebrew-regular-webfont.ttf) format('truetype');
}
@font-face {
    font-family: 'Open Sans Hebrew';
    font-style: italic;
    font-weight: 700;
    src: url(opensanshebrew-bolditalic-webfont.eot);
    src: url(opensanshebrew-bolditalic-webfont.eot?#iefix) format('embedded-opentype'),
    url(opensanshebrew-bolditalic-webfont.woff) format('woff'),
    url(opensanshebrew-bolditalic-webfont.ttf) format('truetype');
}
@font-face {
    font-family: 'Open Sans Hebrew';
    font-style: normal;
    font-weight: 700;
    src: url(opensanshebrew-bold-webfont.eot);
    src: url(opensanshebrew-bold-webfont.eot?#iefix) format('embedded-opentype'),
    url(opensanshebrew-bold-webfont.woff) format('woff'),
    url(opensanshebrew-bold-webfont.ttf) format('truetype');
}
@font-face {
    font-family: 'Open Sans Hebrew';
    font-style: italic;
    font-weight: 800;
    src: url(opensanshebrew-extrabold-webfont.eot);
    src: url(opensanshebrew-extrabold-webfont.eot?#iefix) format('embedded-opentype'),
    url(opensanshebrew-extrabold-webfont.woff) format('woff'),
    url(opensanshebrew-extrabold-webfont.ttf) format('truetype');
}
@font-face {
    font-family: 'Open Sans Hebrew';
    font-style: normal;
    font-weight: 800;
    src: url(opensanshebrew-extrabold-webfont.eot);
    src: url(opensanshebrew-extrabold-webfont.eot?#iefix) format('embedded-opentype'),
    url(opensanshebrew-extrabold-webfont.woff) format('woff'),
    url(opensanshebrew-extrabold-webfont.ttf) format('truetype');
}

这篇关于谷歌字体使用@import不工作在Internet Explorer上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 10:23