<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>文字阴影</title>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
height: 100vh;
background: linear-gradient(45deg,#bfbfbf,#e6e6e6);
display: flex;
justify-content: center;
align-items: center;
}
h1{
font-size:20vmin;
line-height: 1;
margin: 0;
letter-spacing: 5px;
color: #e6e6e6;
text-align: center;
text-shadow: 1px -1px #fff,-1px 1px #999,-5px 5px 5px #808080;
}
</style>
</head>
<body>
<h1>shadow text effect</div>
</body>
</html>
3. 文字阴影
于 2024-02-26 15:55:55 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)