1638
3439
1万
管理员
举报
效果:
代码:
.strokeText { text-align: center; font: bold 4em sans-serif; text-stroke: 2px red; -webkit-text-stroke: 2px red; color: green; }
分析:
实现描边字的关键在于 text-stroke 属性。该属性尚处于实验阶段,所以需要前缀 -webkit- 方能生效,目前,火狐浏览器、基于chromium内核的所有浏览器均支持该属性。
此法,适用于 font-size 设置为较大的文本,字号过小描边效果不佳。
本版积分规则 发表回复 回帖并转播 回帖后跳转到最后一页
协同嘉业科技有限公司 ( 京ICP备2024053108号-1 )
GMT+8, 2026-10-30 07:59 , Processed in 0.084168 second(s), 25 queries .
Powered by Discuz! X3.5
© 2001-2026 Discuz! Team.