我使用的是一种名为“Lato”的字体,它是从作者网站下载的,并使用 fontsquirrel 转换为正确的格式。
包含以下 CSS 后,当我尝试检查文本元素时,Chrome 开发者工具崩溃了。
这里是我使用的字体代码:
@font-face {
font-family: 'Lato';
src: url('../fonts/custom/lato-reg-webfont.eot');
src: url('../fonts/custom/lato-reg-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/custom/lato-reg-webfont.svg#latoregular') format('svg'),
url('../fonts/custom/lato-reg-webfont.woff') format('woff'),
url('../fonts/custom/lato-reg-webfont.ttf') format('truetype');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: 'Lato';
src: url('../fonts/custom/lato-bol-webfont.eot');
src: url('../fonts/custom/lato-bol-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/custom/lato-bol-webfont.svg#latobold') format('svg'),
url('../fonts/custom/lato-bol-webfont.woff') format('woff'),
url('../fonts/custom/lato-bol-webfont.ttf') format('truetype');
font-weight: 700;
font-style: normal;
}
即使我只使用这些字体声明之一,也会发生这种情况。
有什么建议吗?
最佳答案
这种字体似乎在 Google Fonts 上 - 假设它是同一字体?试试这个而不是 Font Squirrel 转换:http://www.google.com/fonts#UsePlace:use/Collection:Lato
关于css - Chrome 开发者工具因使用特定字体而崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20976687/