当前位置: 动力学知识库 > 问答 > 编程问答 >

css - Text Not Displaying in Chrome Until After I Use Inspect Element

问题描述:

The problem is the whole website doesn't show text until I inspect element with Chrome. It all works fine on other browsers.

I don't have any chrome extensions installed and am using an incognito window, but still nothing.

The website passes validation via W3C - the site is: http://www.toricks.com

I'm using @font-face, which by looking at it seems to be setup fine!

Can anyone shed any light on this?

网友答案:

You can try the Font Squirrel way of adding the @font-face like this:

@font-face {
    font-family: 'Comfortaa';
    src: url('comfortaa.eot');
    src: url('comfortaa.eot?#iefix') format('embedded-opentype'),
         url('comfortaa.woff') format('woff'),
         url('comfortaa.ttf') format('truetype'),
         url('comfortaa.svg#comfortaanormal') format('svg');
    font-weight: normal;
    font-style: normal;

}

I think this has the best cross-browser support. Make sure you convert your font to all the different types (you can do that with the Font Squirrel generator).

分享给朋友:
您可能感兴趣的文章:
随机阅读: