<!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>模仿苹果手机滑动解锁效果</title>
<style>
* {
margin: 0;
padding: 0;
list-style: none;
}
body {
background-color: rgb(20, 173, 115);
}
p {
width: 400px;
height: 100px;
font-size: 40px;
line-height: 100px;
text-align: center;
color: transparent;
background-color: rgb(255, 0, 85);
background-image: -webkit-linear-gradient(left top, transparent 30%, #fff 38%, transparent 46%);
transition: 1s;
-webkit-background-clip: text;
}
p:hover {
cursor: pointer;
background-position: 400px 0;
}
</style>
</head>
<body>
<p>向右滑动进行解锁</p>
</body>
</html>
移动高光.
最新推荐文章于 2024-09-05 23:16:39 发布