0
点赞
收藏
分享

微信扫一扫

记录一下css文本文字渐变色

狗啃月亮_Rachel 2022-04-21 阅读 113

代码:

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style>
		.box {
			font-size: 20px;
			font-weight: 600;
			color: #fff;
			background: linear-gradient(#ffffff 16%, #8dffe2 100%);
			background-clip: text;
			-webkit-background-clip: text;
			-webkit-text-fill-color: transparent;
		}
	</style>
</head>
<body>
	<div class="box">hello world</div>
</body>
</html>

效果:

在这里插入图片描述

举报

相关推荐

0 条评论