Ok, so I tried to fix this problem for a while. Oddly enough, the icomoon demo continued to work in IE8, but mine never did, although I felt like I had almost the same thing in place. So I started to nod everything (icomoon demo, as well as my own implementation) and that I found two things that had to be there for this to work.
Firstly, I found that I need to save the cache in the file name.
So, in my implementation, I had:
@font-face { font-family: 'iconFont'; src:url('icon_font.eot'); src:url('icon_font.eot') format('embedded-opentype'), url('icon_font.woff') format('woff'), url('icon_font.ttf') format('truetype'), url('icon_font.svg') format('svg'); font-weight: normal; font-style: normal; }
But I needed:
@font-face { font-family: 'iconFont'; src:url('icon_font.eot?-v9zs5u'); src:url('icon_font.eot?#iefix-v9zs5u') format('embedded-opentype'), url('icon_font.woff?-v9zs5u') format('woff'), url('icon_font.ttf?-v9zs5u') format('truetype'), url('icon_font.svg?-v9zs5u#icomoon') format('svg'); font-weight: normal; font-style: normal; }
Secondly, and it does not make sense, it is that I need something in the stylesheet with the pseudo-selector :hover . It doesn’t matter what it is or what rules it is for him, he just needs something, and then the icons will appear when I hang over them.
So, I just inserted [data-icon]:hover{} into my CSS stylesheet (just like that, without any rules).
I would like to explain to you why this works, but I do not understand. My best guess is that this causes some update in IE8 and causes icons to appear.
Johannes Jun 29 '15 at 17:47 2015-06-29 17:47
source share