0
這兩個結構有什麼區別嗎?URL結構可能會破壞WebFont嗎?
以http://
@font-face {
font-family: 'nexa-boldregular';
src: url('http://example.com/fonts/nexa_bold_webfont.eot');
src: url('http://example.com/fonts/nexa_bold_webfont.eot?#iefix') format('embedded-opentype'), url('http://example.com/fonts//nexa_bold_webfont.woff') format('woff'), url('http://example.com/fonts//nexa_bold_webfont.ttf') format('truetype'), url('http://example.com/fonts//nexa_bold_webfont.svg#nexa_boldregular') format('svg');
font-weight: normal;
font-style: normal;
}
不包含http://
@font-face {
font-family: 'nexa-boldregular';
src: url('//example.com/fonts/nexa_bold_webfont.eot');
src: url('//example.com/fonts/nexa_bold_webfont.eot?#iefix') format('embedded-opentype'), url('//example.com/fonts//nexa_bold_webfont.woff') format('woff'), url('//example.com/fonts//nexa_bold_webfont.ttf') format('truetype'), url('//example.com/fonts//nexa_bold_webfont.svg#nexa_boldregular') format('svg');
font-weight: normal;
font-style: normal;
}
如果是這樣,請解釋。
另外:從我的測試中可以看出,Chrome可以讀取其中任何一種結構,但Firefox不能。
這是一個很好的答案 - 謝謝。我在週末想出了真正的問題。事實證明,IE和Firefox掛在跨域請求上,而webkit沒有。 – staypuftman