如果您不能使用 text-stroke,您可以使用伪元素和 text-shadow 来伪造它。
h1 {
font-size: 50pt;
background: rgb(89,89,255);
background: linear-gradient(90deg, rgba(89,89,255,1) 35%, rgba(0,212,255,1) 100%);
-webkit-background-clip: text;
color: transparent;
z-index:1;
}
h1::before {
content:"Hello World";
position: absolute;
top:45px;
left:7.5px;
font-size: 50pt;
background:none;
text-shadow: 1px 0 0 black, 0 1px 0 black, 0 -1px 0 black, -1px 0 0 black;
-webkit-background-clip: none;
-webkit-text-fill-color: transparent;
z-index:-1;
}
body {
background: rgb(89,89,255);
background: linear-gradient(90deg, rgba(89,89,255,1) 35%, rgba(0,212,255,1) 100%);
}
<h1>Hello World</h1>