<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<style>
.ex1 {
-webkit-animation: adm 1.4s ease infinite;
animation: adm 1.4s ease infinite;
background: linear-gradient(90deg,hsla(0,0%,75%,.2) 25%,hsla(0,0%,51%,.24) 37%,hsla(0,0%,75%,.2) 63%);
background-size: 400% 100%;
width: 100%;
height: 100px;
}
.ex2 {
-webkit-animation: adm 1.4s ease infinite;
animation: adm 1.4s ease infinite;
background: linear-gradient(90deg,hsla(0,0%,75%,.2) 25%,rgba(58, 3, 3, 0.24) 37%,hsla(0,0%,75%,.2) 63%);
background-size: 400% 100%;
width: 100%;
height: 15px;
}
@keyframes adm {
0% {
background-position: 100% 50%;
}
100% {
background-position: 0 50%;
}
}
</style>
</head>
<body>
<div id="app">
<div class="ex1"></div>
<br>
<div class="ex2"></div>
</div>
</body>
</html>
Skeleton 骨架屏 css制作
最新推荐文章于 2024-07-05 21:00:00 发布