我们可以使用css在fontawesome图标周围添加边框吗?

问题描述:

我需要更改图标的边框宽度 - fa-comment-o。我们可以用css更改边框宽度大小吗?

I need to change the border width of the icon - fa-comment-o. Can we change the border-width size with css?

是的,你可以。使用文字阴影:

Yes you can. Use a text-shadow:

.my-icon {
     text-shadow: 0px 0px 3px #000;
}

或者您也可以使用 webkit文本笔划它仅适用于 Chrome Safari

Or Also you can use webkit text stroke remember it only work with Chrome and Safari

CSS-Tricks示例

-webkit-text-fill-color: white;
-webkit-text-stroke-width: 1px;
-webkit-text-stroke-color: black;