CSS- webkit-text-stroke but stroke covers font-color

大憨熊 提交于 2019-12-02 05:37:05

You can do a CSS-based outside text stroke by using ::pseudo-elements. You can actually even do 2 layers of outside stroke.

You can see the technique on http://www.petercarrero.com/examples/stroke/

This method works only for web-kit browsers. The article also mentions a few of the caveats you need to be aware of to get good results.

I hope that helps you.

This is because the font is relatively small comparing to the 1px stroke.

You can try smaller px value, like 0.3px

Fiddle

Also you can simulate this with text-shadow:

Fiddle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!