更新第44个小实例

This commit is contained in:
DESKTOP-BM6RJU5\wyanh 2021-11-16 17:23:34 +08:00
parent 7ae5c8736a
commit 9dcc3ef095
3 changed files with 95 additions and 1 deletions

View File

@ -47,4 +47,5 @@
40. HTML5+CSS3小实例之抽屉式相册
41. HTML5+CSS3小实例之发光文字悬停特效
42. HTML5+CSS3小实例之背景不停渐变效果
43. HTML5+CSS3小实例之3D轮播卡片
43. HTML5+CSS3小实例之3D轮播卡片
44. HTML5+CSS3小实例之炫彩流光圆环加载动画

74
css/44.css Normal file
View File

@ -0,0 +1,74 @@
*{
/* 初始化 取消内外边距 */
margin: 0;
padding: 0;
}
.container{
width: 100%;
/* 100%窗口高度 */
height: 100vh;
/* 弹性布局 水平垂直居中 */
display: flex;
justify-content: center;
align-items: center;
/* 相对定位 */
position: relative;
background-color: #000;
}
.circle{
/* 绝对定位 */
position: absolute;
display: flex;
justify-content: center;
align-items: center;
width: 200px;
height: 200px;
border-radius: 50%;
/* 渐变背景 */
background: linear-gradient(0deg,
#2f66ff,
#9940ff 30%,
#ee37ff 60%,
#ff004c 100%);
/* 执行动画:动画名 时长 线性的 无限次播放 */
animation: circleRotate 1s linear infinite;
}
/* 发光效果 */
.circle::before{
content: "";
position: absolute;
width: 200px;
height: 200px;
border-radius: 50%;
/* 渐变背景 */
background: linear-gradient(0deg,
#2f66ff,
#9940ff 30%,
#ee37ff 60%,
#ff004c 100%);
/* 模糊 */
filter: blur(35px);
}
/* 黑圆 */
.circle::after{
content: "";
position: absolute;
width: 150px;
height: 150px;
border-radius: 50%;
background: #000;
}
span{
color: #fff;
position: absolute;
}
/* 定义动画 */
@keyframes circleRotate {
0%{
transform: rotate(0deg);
}
100%{
transform: rotate(360deg);
}
}

19
html/44.html Normal file
View File

@ -0,0 +1,19 @@
<!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/44.css">
</head>
<body>
<div class="container">
<div class="circle"></div>
<span>加载中</span>
</div>
</body>
</html>