简体   繁体   English

CSS,字体,Squirrel生成器

[英]CSS, Font-face, Squirrel generator

I try to understand the generated code via Squirrel , here is the output: 我尝试通过Squirrel了解生成的代码,这是输出:

@font-face {
    font-family: 'someFont';
    src: url('someFont.eot');
    src: url('someFont.eot?#iefix') format('embedded-opentype'),
         url('someFont.woff') format('woff'),
         url('someFont.ttf') format('truetype'),
         url('someFont.svg#someFont') format('svg');

    font-weight: normal;
    font-style: normal;
}

I don't understand why the first src: url('someFont.eot'); 我不明白为什么第一个src: url('someFont.eot'); is even required, I do understand the IE problem so I understand the requirement for: src: url('someFont.eot?#iefix') format('embedded-opentype'), but what is the reason for the first src ? 甚至是必需的,我确实了解IE问题,所以我了解以下要求: src: url('someFont.eot?#iefix') format('embedded-opentype'),但是第一个src的原因是什么?

And last thing to note what is the reason for #someFont after someFont.svg is it needed to prevent some kind of bug? 最后要注意的是在#someFont之后需要someFont.svg的原因是为了防止某种错误吗?

src: url('someFont.eot'); is for IE9 compatibility Modes, while src: url('someFont.eot?#iefix') format('embedded-opentype') is for IE6 to IE8. 适用于IE9兼容模式,而src: url('someFont.eot?#iefix') format('embedded-opentype')适用于IE6到IE8。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM