文本的真实轮廓



是否可以用html/css轻松地勾勒文本轮廓?我的意思不是用文本阴影属性在它后面放一个阴影,而是用笔划勾勒文本。

.stroke {
-webkit-text-stroke: 2px limegreen;
color: transparent;
}
.stroke-explicit {
-webkit-text-stroke-width: 2px;
-webkit-text-stroke-color: red;
color: transparent;
}
h1 {
font-size: 60px;
}
<h1 class="stroke">Shorthand</h1>
<h1 class="stroke-explicit">Both properties</h1>

最新更新