【发布时间】:2015-04-04 06:32:04
【问题描述】:
我在 Google Chrome 中的自定义图标字体有问题,仅在 Mac 上。它们在边缘被切断。我已经试过了
- 使用更大的 svg 和
- 更喜欢 SVG(在 woff 之前)
- 使用 CSS 设置
你可以在 kuyichi.com 上看到它(如果你有 Chrome 和 OSX) 图标没有边框,四舍五入是图标本身。
有没有人可以解决这个问题?
实时取景: http://i.stack.imgur.com/niqcP.png
icomoon 上的图标包: http://i.stack.imgur.com/PwyCm.png
@font-face {
font-family: 'iconfont';
src:url('fonts/iconfont.eot?nr90fm');
src:url('fonts/iconfont.eot?#iefixnr90fm') format('embedded-opentype'),
url('fonts/iconfont.woff?nr90fm') format('woff'),
url('fonts/iconfont.ttf?nr90fm') format('truetype'),
url('fonts/iconfont.svg?nr90fm#iconfont') format('svg');
font-weight: normal;
font-style: normal;
}
[class^="icons-"], [class*=" icons-"] {
font-family: 'iconfont';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icons-knit:before {
content: "\e628";
}
【问题讨论】:
-
向我们展示相关的 HTML 和 CSS——没有它我们什么都做不了。将其放入jsFiddle 也会有所帮助。
标签: html css macos google-chrome icon-fonts