图片描述
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
padding: 0;
margin: 0;
}
body {
background-color: #000;
}
@property --direc {
syntax: '<angle>';
initial-value: 0deg;
inherits: false;
}
.big {
margin: 100px auto;
width: 200px;
height: 400px;
border-radius: 10px;
background-image: linear-gradient(var(--direc), #5ddcff, #3c67e3 43%, #4e00c2);
animation: rotate 3s linear infinite;
position: relative;
}
.big::before {
content: '';
display: block;
position: absolute;
top: 10px;
left: 10px;
width: calc(100% - 20px);
height: calc(100% - 20px);
background-color: #fff;
border-radius: 10px;
}
@keyframes rotate {
to {
--direc: 360deg
}
}
</style>
</head>
<body>
<div class="big"></div>
</body>
</html>
网友评论