首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >图标在Chrome中被切断(仅在OSX上)

图标在Chrome中被切断(仅在OSX上)
EN

Stack Overflow用户
提问于 2015-02-04 16:28:00
回答 1查看 623关注 0票数 0

我有一个问题,我的自定义图标字体在谷歌Chrome,只有在Mac。他们在边缘被切断。我已经试过了

  • 使用更大的svg和
  • 更喜欢SVG (在woff之前)
  • 播放css设置

你可以在kuyichi.com上看到它(如果你有Chrome和OSX)图标没有边框,圆环是与图标本身。

有谁能解决这个问题吗?

实时视图:http://i.stack.imgur.com/niqcP.png

图标上的图标包:http://i.stack.imgur.com/PwyCm.png

代码语言:javascript
复制
@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";
}

EN

回答 1

Stack Overflow用户

发布于 2015-02-04 17:57:07

尝试将大小信息添加到图标delcaration:

代码语言:javascript
复制
.icons-knit:before {
    content: "\e628";
    width:40px;
    height:40px;
    font-size:20px;
}
票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28326415

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档