css实现五种线圈转动loading加载动画效果代码
代码语言:html
所属分类:加载滚动
代码描述:css实现五种线圈转动loading加载动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
/* COMMON STYLES: YOU DON'T NEED THEM */
body {
background-color: #fff;
}
.container {
width: 960px;
margin: 70px auto 0px auto;
text-align: center;
}
.container h1 {
font-family: "Lato", sans-serif;
font-size: 40px;
color: #212121;
margin-bottom: 20px;
}
.container h1 + a {
color: #212121;
font-family: "Lato", sans-serif;
font-size: 20px;
text-decoration: none;
}
.container h1:before {
content: "{";
display: inline-block;
padding-right: 20px;
}
.container h1:after {
content: "}";
display: inline-block;
padding-left: 20px;
}
.container .spinners {
margin-top: 50px;
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
}
.container .spinners .spinner-block {
width: 125px;
text-align: center;
margin-right: 83px;
}
.container .spinners .spinner-block:nth-child(5n) {
margin-right: 0px;
}
.container .spinners .spinner-block h2 {
font-family: "Pacifico", cursive;
font-size: 17px;
color: #212121;
margin-bottom: 20px;
}
/* YOU NEED THESE STYLES */
/* spinner style */
.spinner {
position: relative;
width: 125px;
height: 125px;
}
.spinner:before, .spinner:after {
content: "";
display: block;
position: absolute;
border-width: 4px;
border-style: solid;
border-radius: 50%;
}
/* spinner-1 styles */
@-webkit-keyframes rotate-animation {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes rotate-animation {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@-webkit-keyframes anti-rotate-animation {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(-360deg);
}
}
@keyframes anti-rotate-animation {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(-360deg);
}
}
.spinner.spinner-1:before {
width: 117px;
height: 117px;
border-bottom-color: #212121;
border-right-color: #212121;
border-top-color: rgba(33, 33, 33, 0);
border-left-color: rgba(33, 33, 33, 0);
top: 0px;
left: 0px;
-webkit-animation: rotate-animation 1s linear 0s infinite;
animation: rotate-animation 1s linear 0s infinite;
}
.spinner.spinner-1:after {
width: 81.9px;
height: 81.9px;
border-bottom-color: #212121;
border-right-color: #212121;
border-top-color: rgba(33, 33, 33, 0);
border-left-color: rgba(33, 33, 33, 0);
top: 17.55px;
left: 17.55px;
-webkit-animation: anti-rotate-animation 0.85s linear 0s infinite;
animation: anti-r.........完整代码请登录后点击上方下载按钮下载查看
网友评论0