更新第69个小实例

This commit is contained in:
DESKTOP-BM6RJU5\wyanh 2021-12-13 18:15:20 +08:00
parent 45191d10b0
commit eaa4e1fbc9
3 changed files with 83 additions and 1 deletions

View File

@ -72,4 +72,5 @@
65. HTML5+CSS3小实例之纯CSS实现点赞的动画效果
66. HTML5+CSS3小实例之带缩略图的焦点图切换效果
67. HTML5+CSS3小实例之纯CSS实现一个简单的太阳系
68. HTML5+CSS3小实例之人物介绍卡片
68. HTML5+CSS3小实例之人物介绍卡片
69. HTML5+CSS3小实例之动感的环形加载动画

65
css/69.css Normal file
View File

@ -0,0 +1,65 @@
*{
/* 初始化 */
margin: 0;
padding: 0;
}
body{
/* 100%窗口高度 */
height: 100vh;
/* 弹性布局 水平+垂直居中 */
display: flex;
justify-content: center;
align-items: center;
background-color: #222;
}
/* 外圈 */
.loader{
width: 200px;
height: 200px;
/* 相对定位 */
position: relative;
border-radius: 50%;
border: 4px solid transparent;
border-top-color: #4bc0c8;
/* 执行动画:动画名 时长 线性的 无限次播放 */
animation: spin 2s linear infinite;
}
/* 中圈 */
.loader::before{
content: "";
/* 绝对定位 */
position: absolute;
left: 5px;
top: 5px;
right: 5px;
bottom: 5px;
border-radius: 50%;
border: 4px solid transparent;
border-top-color: #c779d0;
/* 执行动画:动画名 时长 线性的 无限次播放 */
animation: spin 3s linear infinite;
}
/* 内圈 */
.loader::after{
content: "";
position: absolute;
left: 15px;
top: 15px;
right: 15px;
bottom: 15px;
border-radius: 50%;
border: 4px solid transparent;
border-top-color: #feac5e;
/* 执行动画:动画名 时长 线性的 无限次播放 */
animation: spin 1.5s linear infinite;
}
/* 定义动画 */
@keyframes spin {
0%{
transform: rotate(0deg);
}
100%{
transform: rotate(360deg);
}
}

16
html/69.html Normal file
View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<title>动感的环形加载动画</title>
<link rel="stylesheet" href="../css/69.css">
</head>
<body>
<div class="loader"></div>
</body>
</html>