View Full Version : سوال: توضیح کد css3
eminem.encore
جمعه 14 تیر 1392, 10:22 صبح
خواهشاً یکی از دوستان راهنماییم کنن و این کد css رو توضیح بدن
@font-face {
font-family: "BYekan";
src: url("fo/BYekan.eot?#iefix") format("embedded-opentype"), url("fo/BYekan.woff") format("woff"), url("fo/BYekan.ttf") format("truetype"), url("fo/BYekan.svg#byekan") format("svg");
مخصوصاً قسمت ?#iefix
کامروا
جمعه 14 تیر 1392, 10:52 صبح
پسوند های متفاوت مثل eof , woff , .... برای مرورگرها و ورژن های مختلف هست.
?#iefix
مرورگر IE8 و ماقبل، وقتی بیش از یک آدرس فونت (src) رو به صفحه بدید ، به مشکل بر میخوره.
برای رفع این مشکل از ?#iefix استفاده میکنند.
Internet Explorer <9 has a bug in the parser for the src attribute. If you include more than one font format in the src, IE fails to load it and reports a 404 error. The reason is that IE attempts to load as a file everything between the opening parenthesis all the way to the very last closing parenthesis. To deal with that wrong behavior, you merely declare the EOT first and append a single question mark. The question mark fools IE into thinking the rest of the string is a query string and loads just the EOT file. The other browsers follow the spec and select the format they need based on the src cascade and the format hint.
توضیحات (http://stackoverflow.com/questions/14207425/css-font-face-iefix)
میتونید ببینید کاربرد پسوند های مختلف :
@font-face {
font-family: 'MyWebFont';
src: url('webfont.eot'); /* IE9 Compat Modes */
src: url('webfont.eot?#Anything') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff') format('woff'), /* Modern Browsers */
url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */
url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.