css3实现文字多层描边
语法:
text-stroke:[ text-stroke-width ] || [ text-stroke-color ]
取值:
[ text-stroke-width ]:设置或检索对象中的文字的描边厚度
[ text-stroke-color ]:设置或检索对象中的文字的描边颜色
最终效果:
实现方式
p {
color: #fff;
font-size: 40px;
font-weight: 400;
position: relative;
z-index: 0;
}
p::before,
p::after {
content: '实现文字多层描边';
position: absolute;
left: 0;
z-index: -1;
}
p::before {
-webkit-text-stroke: 20px #355c7d;
}
p::after {
-webkit-text-stroke: 10px #c06c84;
}
<p>实现文字多层描边</p>