<!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 系列課程,這么課程涵蓋的內容也是非常的多,雖然內容十分簡單容易理解,但是非常...