简体   繁体   中英

CSS, Font-face, Squirrel generator

I try to understand the generated code via Squirrel , here is the output:

@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'); 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 ?

And last thing to note what is the reason for #someFont after someFont.svg is it needed to prevent some kind of bug?

src: url('someFont.eot'); is for IE9 compatibility Modes, while src: url('someFont.eot?#iefix') format('embedded-opentype') is for IE6 to IE8.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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