Domanda

I have been using @font-face for only web not mobile.

below code was work!! before update ie10...

enter image description here

font.css -> There is media-query. iefont.css -> There is no media-query.

and I found that ie10 is not supported conditionl comment. (and ie11 too..) and Also ie is not supported @font-face in media query...

In my case I have to use @font-face only web NOT mobile. so I'm searching Various way..

for example..

if(/@cc_on!@/false){document.documentElement.className+=' ie10';}

or

if (Function('/@cc_on return document.documentMode===10@/')() && window.innerWidth >= 980) { var link = document.createElement('link'); link.rel = 'stylesheet'; link.href = 'css/fonts.min.css'; document.getElementsByTagName('head')[0].appendChild(link); }

-> these codes works but... only ie10 and it can not read @font-face but it can read just css.

and so on...(just like css)

I thought I can solve it by using css! but... maybe it will never solve by using css..

Anyone solve it? How can you solve it?

Please Help me..

È stato utile?

Soluzione

you can target ie mobile using conditional comments...the example below is how to target everything but ie mobile:


<![if !IEMobile]> 
<style> put your @font-face here </style>
<![endif]>

if you still have to target ie10, you can use conditional compilation for targeting, which is almost exactly like conditional comments. you can see a working demo here: http://dev.bowdenweb.com/ua/browsers/ie/ie10-detection-via-cc.html

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top