方法一(有缺陷):
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Examples</title>
<style>
.num1{
-webkit-text-stroke: 0.4px red;
}
</style>
</head>
<body>
<div class="num1">测试</div>
</body>
</html>
方法二(普遍适用,但麻烦):
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Examples</title>
<style>
.num1{
position: absolute;
-webkit-text-stroke: 2px red;
top: 0;
left: 0;
z-index: 3;
}
.num2{
position: absolute;
top: 0;
left: 0;
z-index: 99;
}
</style>
</head>
<body>
<div class="num1">测试</div>
<div class="num2">测试</div>
</body>
</html>