<!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>
.sc-state {
display: inline-block;
background: red;
width: 8px;
height: 8px;
border-radius: 50%;
vertical-align: middle;
}
.sc-status-processing {
position: relative;
}
.sc-status-processing:after {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
border-radius: 50%;
background: inherit;
content: '';
animation: warn 1.2s ease-in-out infinite;
}
@keyframes warn {
0% {
transform: scale(0.5);
opacity: 1;
}
30% {
opacity: 0.7;
}
100% {
transform: scale(2.5);
opacity: 0;
}
}
</style>
</head>
<body>
<div class="sc-state sc-status-processing"></div>
</body>
</html>
css动画
于 2023-08-24 16:50:06 首次发布