Creation dune icone de prechargement avec css
<!DOCTYPE html>
<html>
<head>
<title>Création d'une icone de préchargement animé avec CSS | Par MEZGANI SAID</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keyword" content="Création d'une icone de préchargement animé avec CSS">
<meta name="author" content="Mezgani said">
<meta name="copyright" content="NGLESSON">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" type="text/css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body class="container h-100">
<div class="row text-center mx-auto h-100 justify-content-center align-items-center mx-auto">
<div class="col-lg-12 loading mt-5 mb-5">
<div id="loader">
<div class="dot"></div>
<div class="dot"></div>
<div class="dot"></div>
<div class="dot"></div>
<div class="dot"></div>
<div class="dot"></div>
<div class="dot"></div>
<div class="dot"></div>
<div class="lading"></div>
</div>
</div>
</div>
</body>
</html>
.loading{
margin-top:5%;
top:5%;
}
#loader {
bottom: 0;
height: 175px;
left: 0;
margin: auto;
position: absolute;
right: 0;
top: 100px;
width: 175px;
}
#loader .dot {
bottom: 0;
height: 100%;
left: 0;
margin: auto;
position: absolute;
right: 0;
top: 0;
width: 87.5px;
}
#loader .dot::before {
border-radius: 100%;
content: "";
height: 87.5px;
left: 0;
position: absolute;
right: 0;
top: 0;
transform: scale(0);
width: 87.5px;
}
#loader .dot:nth-child(7n+1) {
transform: rotate(45deg);
}
#loader .dot:nth-child(7n+1)::before {
animation: 0.8s linear 0.1s normal none infinite running load;
background: #00ff80 none repeat scroll 0 0;
}
#loader .dot:nth-child(7n+2) {
transform: rotate(90deg);
}
#loader .dot:nth-child(7n+2)::before {
animation: 0.8s linear 0.2s normal none infinite running load;
background: #00ffea none repeat scroll 0 0;
}
#loader .dot:nth-child(7n+3) {
transform: rotate(135deg);
}
#loader .dot:nth-child(7n+3)::before {
animation: 0.8s linear 0.3s normal none infinite running load;
background: #00aaff none repeat scroll 0 0;
}
#loader .dot:nth-child(7n+4) {
transform: rotate(180deg);
}
#loader .dot:nth-child(7n+4)::before {
animation: 0.8s linear 0.4s normal none infinite running load;
background: #0040ff none repeat scroll 0 0;
}
#loader .dot:nth-child(7n+5) {
transform: rotate(225deg);
}
#loader .dot:nth-child(7n+5)::before {
animation: 0.8s linear 0.5s normal none infinite running load;
background: #2a00ff none repeat scroll 0 0;
}
#loader .dot:nth-child(7n+6) {
transform: rotate(270deg);
}
#loader .dot:nth-child(7n+6)::before {
animation: 0.8s linear 0.6s normal none infinite running load;
background: #9500ff none repeat scroll 0 0;
}
#loader .dot:nth-child(7n+7) {
transform: rotate(315deg);
}
#loader .dot:nth-child(7n+7)::before {
animation: 0.8s linear 0.7s normal none infinite running load;
background: magenta none repeat scroll 0 0;
}
#loader .dot:nth-child(7n+8) {
transform: rotate(360deg);
}
#loader .dot:nth-child(7n+8)::before {
animation: 0.8s linear 0.8s normal none infinite running load;
background: #ff0095 none repeat scroll 0 0;
}
#loader .lading {
background-image: url("../images/loading.gif");
background-position: 50% 50%;
background-repeat: no-repeat;
bottom: -40px;
height: 20px;
left: 0;
position: absolute;
right: 0;
width: 180px;
}
@keyframes load {
100% {
opacity: 0;
transform: scale(1);
}
}
@keyframes load {
100% {
opacity: 0;
transform: scale(1);
}
}