سؤال

Consider a similar css code:

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

Does this code determine more HTTP requests to download all the formats or does the browser choose the best supported format?

هل كانت مفيدة؟

المحلول

Nope, browser will choose one compatible format. Feel free to add as many sources as you like :)

نصائح أخرى

No, only one will be used. You can test it for example with firebug or google console and check the list of all requests that has been made (network tab)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top