I Cant get @font face to work for internet explorer 11
我一直在尝试使用自定义字体,但似乎无法在所有浏览器上使用,但不能在Internet Explorer 11上运行。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | @font-face { font-family: 'comfortaa'; src: url('Comfortaa.eot'); /* IE9 Compat Modes */ src: url('Comfortaa.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('../fonts/Comfortaa_Regular.ttf.woff') format('woff'), /* Modern Browsers */ url('../fonts/Comfortaa_Regular.ttf') format('truetype'), /* Safari, Android, iOS */ url('../fonts/Comfortaa_Regular.svg') format('svg'); /* Legacy iOS */ } @font-face { font-family: 'comfortaabold'; src: url('Comfortaa-Bold.eot'); /* IE9 Compat Modes */ src: url('Comfortaa-Bold.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('../fonts/Comfortaa-Bold.ttf.woff') format('woff'), /* Modern Browsers */ url('../fonts/Comfortaa-Bold.ttf') format('truetype'), /* Safari, Android, iOS */ url('../fonts/Comfortaa-Bold.svg') format('svg'); /* Legacy iOS */ } |
对于IE 11来说效果很好
1 2 3 4 5 6 | @font-face { font-family:"MyFont_Lite"; src: url("../Fonts/myfont.ttf") format("truetype"); src: url("../Fonts/myfont.woff") format("woff"); } |
如果您不熟悉编码,也许最简单的解决方案是通过将字体放在
1 | <link href='http://fonts.googleapis.com/css?family=Comfortaa:700' rel='stylesheet' type='text/css'> |
提出并回答了一些类似的问题,可以帮助您进行故障排除:
- 如何使IE中的Google字体有效?
- IE 11"防弹"字体和后退字体不起作用
- Google字体无法在Internet Explorer(IE)11中运行
- IE 11无法正确处理字体声明
- IE Intranet兼容性视图不包含某些字体
- 和更多...
在发布问题之前进行搜索是明智的。
如果您想在Mac上的资源管理器中测试您的网站,甚至还有疑问和解答。如果您有几个GB可用,则此选项应该可以正常工作。如果没有,您可以查看适用于Windows,Mac OSX,iOS或Android设备的新Azure RemoteApp。