简体   繁体   English

Google Web字体不在OSX Safari中显示,但在Firefox,Chrome,Opera(用于OSX,Windows和Linux)和Internet Explorer中显示

[英]Google Web Fonts not displaying in OSX Safari but do display in Firefox, Chrome, Opera (for OSX, Windows, and Linux) and Internet Explorer

The following website ( http://www.ecu.edu/english/tpc/tpcintern/index.cfm ) is supposed to make use of Google Web Fonts, and the fonts display perfectly in all browsers except Safari. 以下网站( http://www.ecu.edu/english/tpc/tpcintern/index.cfm )应该使用Google Web字体,并且该字体在Safari之外的所有浏览器中都能完美显示。 The Javascript used is: 使用的Javascript是:

  WebFontConfig = {
    google: { families: [ 'Lato:100:latin' ] }
  };
  (function() {
    var wf = document.createElement('script');
    wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
      '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
    wf.type = 'text/javascript';
    wf.async = 'true';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(wf, s);
  })(); 

I realize that the JS doesn't use the tags but I removed them because CommonSpot needs them removed. 我意识到JS不使用标签,但我删除了标签,因为CommonSpot需要将其删除。 There are actually a few different Web Fonts being used, but the JS is the same for each with the exception of relevant font information. 实际上,实际上使用了几种不同的Web字体,但是除了相关的字体信息之外,每种JS都是相同的。 An example of the CSS is this: CSS的示例是这样的:

#navigation {
 font-family: 'Lato', sans-serif;
 font-size: 1.3em;
 font-style: normal;
 float: left;
 margin: .5em 0 0 .5em;
 width: 70%;
 height: 2em;
 position: relative;
 padding: .5em 0;
 text-transform: uppercase;
 font-size: 1em;
 background-color: #592a8a;
}

Finally, the web fonts are hosted by Google, if that makes a difference (I wouldn't think that it would, being as they seem to be working in other browsers?). 最后,网络字体由Google托管(如果有区别的话)(我认为不会,因为它们似乎可以在其他浏览器中正常工作?)。

There was a problem with CommonSpot and how it handles JavaScript. CommonSpot及其处理JavaScript时出现问题。 For anyone else who uses CommonSpot, just create a separate HTML file with the JavaScript, upload it to the CustomCF folder, and attach it through CommonSpot. 对于使用CommonSpot的其他人,只需使用JavaScript创建一个单独的HTML文件,然后将其上传到CustomCF文件夹,然后通过CommonSpot将其附加。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Facebook连接。 适用于Firefox / Internet Explorer,不适用于Chrome / Safari / Opera - Facebook connect. Works in Firefox/Internet Explorer, not in Chrome/Safari/Opera 精简快捷的方法来使插件在所有主流浏览器上都能正常工作? Firefox,Chrome,[Opera,互联网浏览器,野生动物园] - lean&fast way to make an addon work for all major browsers? firefox,chrome,[opera,internet explorer,safari] 元素未在FireFox和Opera上显示,但在Chrome和Safari上正在运行 - Element is not displaying on FireFox & Opera, but on Chrome & Safari is working 为什么Google Map标记在Firefox上而不是在Chrome,Safari和Internet Explorer上显示 - Why are Google Map markers showing up on Firefox by not on Chrome, Safari and Internet Explorer javascript脚本可在Firefox,Chrome,Safari,Internet Explorer &lt;9,而不是IE 9中运行 - javascript script works in Firefox, Chrome, Safari, Internet Explorer < 9, but not in IE 9 SWF不透明+ div不透明Chrome和OSX上的Opera - swf not transparent + div opacity chrome & opera on osx 如何强制Google Chrome / Firefox使用Internet Explorer Web浏览器控件 - how to force google chrome/firefox to use Internet explorer web browser control 与 Firefox 和 Internet Explorer 不同,Chrome 中不显示顶部横幅图像 - The top banner image not displaying in Chrome unlike in Firefox and Internet Explorer Ajax响应中的javascript在Firefox,Chrome,Opera中有效,但不能在Internet Explorer 11中运行-对象不支持此属性或方法 - javascript in ajax response works in Firefox, Chrome, Opera BUT NOT internet explorer 11 - Object does not support this property or method jQuery weekcalendar在Firefox中正确显示,但在Chrome / Safari中正确显示(仅在iOS / OSX设备上) - jQuery weekcalendar displays correctly in Firefox but not in Chrome/Safari (only on iOS/OSX devices)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM