GVKun编程网logo

CSS @ font-face在IE8中不起作用(css fontfamily)

8

在本文中,我们将给您介绍关于CSS@font-face在IE8中不起作用的详细内容,并且为您解答cssfontfamily的相关问题,此外,我们还将为您提供关于$.ajax调用在IE8中工作正常,在F

在本文中,我们将给您介绍关于CSS @ font-face在IE8中不起作用的详细内容,并且为您解答css fontfamily的相关问题,此外,我们还将为您提供关于$.ajax调用在IE8中工作正常,在Firefox和Chrome浏览器中不起作用、@ font-face在IE8中有效,但在IE9中无效、@ Font-face在手机上不起作用、addEventListener在IE8中不起作用的知识。

本文目录一览:

CSS @ font-face在IE8中不起作用(css fontfamily)

CSS @ font-face在IE8中不起作用(css fontfamily)

我尝试阅读有关如何处理IE中自定义字体的多篇文章,但是它们似乎对我没有用。我尝试将字体转换为EOT,但这似乎也不起作用。我不确定自己在做什么错,所以我将发布我的代码

@font-face {  font-family: "Klavika Regular";    src: url(''../fonts/klavika.eot'');    src: local(''☺''), url(''../fonts/klavika.woff'') format(''woff''), url(''../fonts/klavika.ttf'') format(''truetype''), url(''../fonts/klavika.svg'') format(''svg'');  font-weight: normal;  font-style: normal;}

答案1

小编典典

这在ie8 / 9中有效

@font-face {    font-family: ''AftaserifRegular'';    src: url(''AftaSerifThin-Regular-webfont.eot'');    src: url(''AftaSerifThin-Regular-webfont.eot?#iefix'') format(''embedded-opentype''),         url(''AftaSerifThin-Regular-webfont.woff'') format(''woff''),         url(''AftaSerifThin-Regular-webfont.ttf'') format(''truetype''),         url(''AftaSerifThin-Regular-webfont.svg#AftaserifRegular'') format(''svg'');    font-weight: normal;    font-style: normal;}

$.ajax调用在IE8中工作正常,在Firefox和Chrome浏览器中不起作用

$.ajax调用在IE8中工作正常,在Firefox和Chrome浏览器中不起作用

这是我的代码

$.ajax(
{
    type: "GET",url: 'http://devserver:7995/stdpart/services/GetAllPartsWithFilter',dataType: 'json',data: jsonPartsData,success: fnGetPartsData,error: PartsLoadError  
});

这是在IE8中运行良好的代码,但在Firefox和Chrome浏览器中失败了.当我检查XHR对象时,它说的是状态代码为0.我检查了所有其他问题,没有一个能帮我识别问题.

让我知道,如果我在这段代码中做错了什么.如果$.ajax有一些兼容性问题,那么请建议一些与之相当的东西.

更新:
我们找到了一个解决方案
http://www.xml.com/pub/a/2005/12/21/json-dynamic-script-tag.html

它使用Dynamic Sc​​ripting的概念.我们在我们的应用程序中做了同样的事情,然后现在每件事似乎都在工作.然而要充分分析.

解决方法

这是因为 Same origin policy.你不能使用ajax来调用外部站点.如果你真的想使用,你必须使用 JSONP.或者你可以使用服务器端代理.意味着,在服务器端调用外部站点并对该Web服务执行ajax调用.

更新:

在您的网站和web网络方法中创建webserve,并提供以下代码

string proxyURL = "http://devserver:7995/stdpart/services/GetAllPartsWithFilter";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(proxyURL);
request.Method = "GET";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();

if (response.StatusCode.ToString().ToLower() == "ok")
{
    Stream content = response.GetResponseStream();
    StreamReader contentReader = new StreamReader(content);         
    return contentReader.ReadToEnd();
}
return string.Empty;

然后使用您的代码访问本地服务.

for more information please refer this link

@ font-face在IE8中有效,但在IE9中无效

@ font-face在IE8中有效,但在IE9中无效

如上所述,我遇到了@ font-face无法在IE9中显示的问题,尽管它在包括IE8及以下版本的所有其他浏览器中都可以正常显示。此外,在我的计算机上本地查看时,IE9会显示字体,而不会完全显示。

使用的代码是:

    @font-face {
                font-family: 'LeagueGothicRegular';
                src: url('league_gothic_0-webfont.eot');
                src: local('League Gothic Regular'),url('league_gothic_0-webfont.woff') format('woff'),url('league_gothic_0-webfont.ttf') format('truetype'),url('league_gothic_0-webfont.svg#webfonta36nFpyE') format('svg');font-weight: normal;font-style: normal;
}

任何人都知道为什么会发生这种情况吗?

@ Font-face在手机上不起作用

@ Font-face在手机上不起作用

这是我的代码,它可以在台式机和平板电脑上完美运行,但不能在移动设备上运行。是代码还是在移动设备上无法使用某些字体

@font-face {
    font-family: 'Out';
    src: url('http://location/Outstanding.otf');
}

addEventListener在IE8中不起作用

addEventListener在IE8中不起作用

我已经动态创建了一个复选框。我曾经addEventListener在单击复选框时调用过一个函数,该函数在Google
Chrome和Firefox中有效,但 在Internet Explorer 8中不起作用 。这是我的代码:

var _checkbox = document.createElement("input");_checkbox.addEventListener("click", setCheckedValues, false);

setCheckedValues 是我的事件处理程序。

答案1

小编典典

尝试:

if (_checkbox.addEventListener) {    _checkbox.addEventListener("click", setCheckedValues, false);}else {    _checkbox.attachEvent("onclick", setCheckedValues);}

更新: 对于IE9之前的InternetExplorer版本,应使用attachEvent方法将指定的侦听器注册到调用它的EventTarget上,对于其他侦听器,应使用addEventListener。

今天关于CSS @ font-face在IE8中不起作用css fontfamily的讲解已经结束,谢谢您的阅读,如果想了解更多关于$.ajax调用在IE8中工作正常,在Firefox和Chrome浏览器中不起作用、@ font-face在IE8中有效,但在IE9中无效、@ Font-face在手机上不起作用、addEventListener在IE8中不起作用的相关知识,请在本站搜索。

本文标签: