我打电话给我的字体像这样:404错误,当IE加载字体
@font-face {
font-family: 'dinar';
src: url('../fonts/dinarm.eot?#'),
local('?'),
local('Mj_Dinar Two Medium'),
url('../fonts/dinarm.woff') format('woff'),
url('../fonts/dinarm.ttf') format('truetype'),
url('../fonts/dinarm.svg') format('svg');
font-weight: normal;
font-style: normal
}
@font-face {
font-family: 'font-bmi';
src: url('../fonts/font-bmi/font-bmi.eot');
src: url('../fonts/font-bmi/font-bmi.eot') format('eot'),
url('../fonts/font-bmi/font-bmi.woff') format('woff'),
url('../fonts/font-bmi/font-bmi.ttf') format('truetype');
font-weight: normal;
font-style: normal
}
每次使用Internet Explorer一些用户尝试,我看到很多404错误的虚拟主机使用日志访问该网站,最终用户被我的安全插件禁止。有使用日志的例子:
80.00.000.146 - - [05/Apr/2017:00:46:10 +0430]
"GET /wp-content/themes/fonts/font-bmi/font-bmi.eot)%20format(%22eot%22),
%20url(../fonts/font-bmi/font-bmi.woff)%20format(%22woff%22),
%20url(../fonts/font-bmi/font-bmi.ttf)%20format(%22truetype%22 HTTP/1.1" 404 4058
"http://www.21tech.ir/some-page/" "Mozilla/4.0
(compatible; MSIE 8.0; Windows NT 5.1; --some other information--)"
我知道它写Mozilla/4.0
但它实际上IE浏览器我测试过它。
什么问题,以及如何解决或避免?
的路径应该是相对的CSS文件本身,而不是从调用CSS页面。这是正确的道路吗? – iguypouf
@iguypouf是的,它只是发生在IE浏览器。 – ata