<!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>
#loading{
width: 50px;
height: 50px;
border: 3px solid lightblue;
border-top-color: lightcoral;
border-radius: 50%;
animation: rotateloading 1s infinite;
}
@keyframes rotateloading {
0%{
transform: rotate(0deg);
}
100%{
transform: rotate(360deg);
}
}
.loading-svg{
width: 100px;
height: 100px;
background-color: lightgray;
animation: loading-rotate 1.5s infinite ease-in-out;
}
.path{
stroke: #409eff;
stroke-width: 2;
animation: loading-dash 1.5s ease-in-out infinite;
}
@keyframes loading-rotate {
to{
transform: rotate(1turn);
}
}
@keyframes loading-dash {
0%{
stroke-dasharray: 1,126;
stroke-dashoffset: 0;
}
50%{
stroke-dasharray: 95,126;
stroke-dashoffset: -31px;
}
to{
stroke-dasharray: 6,120;
stroke-dashoffset: -120px;
}
}
</style>
</head>
<body>
<svg viewBox="0 0 50 50" class="loading-svg">
<Circle cx="25" cy="25" r="20" fill="none" class="path"></Circle>
</svg>
<div id="loading"></div>
</body>
</html>
css loading
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- 最近本人正在极客学院学习 HTML5 系列课程,这么课程涵盖的内容也是非常的多,虽然内容十分简单容易理解,但是非常...