.loading svg polyline {
fill: none;
stroke-width: 3;
stroke-linecap: round;
stroke-linejoin: round;
}
.loading svg polyline#back {
fill: none;
stroke: #ff4d5033;
}
.loading svg polyline#front {
fill: none;
stroke: #ff4d4f;
stroke-dasharray: 48, 144;
stroke-dashoffset: 192;
animation: dash_682 1.4s linear infinite;
}
@keyframes dash_682 {
72.5% {
opacity: 0;
}
to {
stroke-dashoffset: 0;
}
}
fill: none;
stroke-width: 3;
stroke-linecap: round;
stroke-linejoin: round;
}
.loading svg polyline#back {
fill: none;
stroke: #ff4d5033;
}
.loading svg polyline#front {
fill: none;
stroke: #ff4d4f;
stroke-dasharray: 48, 144;
stroke-dashoffset: 192;
animation: dash_682 1.4s linear infinite;
}
@keyframes dash_682 {
72.5% {
opacity: 0;
}
to {
stroke-dashoffset: 0;
}
}
<div class="loading">
<svg width="64px" height="48px">
<polyline points="0.157 23.954, 14 23.954, 21.843 48, 43 0, 50 24, 64 24" id="back"></polyline>
<polyline points="0.157 23.954, 14 23.954, 21.843 48, 43 0, 50 24, 64 24" id="front"></polyline>
</svg>
</div>
<svg width="64px" height="48px">
<polyline points="0.157 23.954, 14 23.954, 21.843 48, 43 0, 50 24, 64 24" id="back"></polyline>
<polyline points="0.157 23.954, 14 23.954, 21.843 48, 43 0, 50 24, 64 24" id="front"></polyline>
</svg>
</div>
Dev_html
Photo
.loader {
width: 64px;
height: 64px;
position: relative;
background: #FFF;
border-radius: 4px;
overflow: hidden;
}
.loader:before {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 40px;
height: 40px;
transform: rotate(45deg) translate(30%, 40%);
background: #ff9371;
box-shadow: 32px -34px 0 5px #ff3d00;
animation: slide 2s infinite ease-in-out alternate;
}
.loader:after {
content: "";
position: absolute;
left: 10px;
top: 10px;
width: 16px;
height: 16px;
border-radius: 50%;
background: #ff3d00;
transform: rotate(0deg);
transform-origin: 35px 145px;
animation: rotate 2s infinite ease-in-out;
}
@keyframes slide {
0% , 100% {
bottom: -35px
}
25% , 75% {
bottom: -2px
}
20% , 80% {
bottom: 2px
}
}
@keyframes rotate {
0% {
transform: rotate(-15deg)
}
25% , 75% {
transform: rotate(0deg)
}
100% {
transform: rotate(25deg)
}
}
width: 64px;
height: 64px;
position: relative;
background: #FFF;
border-radius: 4px;
overflow: hidden;
}
.loader:before {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 40px;
height: 40px;
transform: rotate(45deg) translate(30%, 40%);
background: #ff9371;
box-shadow: 32px -34px 0 5px #ff3d00;
animation: slide 2s infinite ease-in-out alternate;
}
.loader:after {
content: "";
position: absolute;
left: 10px;
top: 10px;
width: 16px;
height: 16px;
border-radius: 50%;
background: #ff3d00;
transform: rotate(0deg);
transform-origin: 35px 145px;
animation: rotate 2s infinite ease-in-out;
}
@keyframes slide {
0% , 100% {
bottom: -35px
}
25% , 75% {
bottom: -2px
}
20% , 80% {
bottom: 2px
}
}
@keyframes rotate {
0% {
transform: rotate(-15deg)
}
25% , 75% {
transform: rotate(0deg)
}
100% {
transform: rotate(25deg)
}
}
👍1
Dev_html
Photo
Html :-
<label>
<input type="checkbox" class="slider">
<div class="switch">
<div class="suns"></div>
<div class="moons">
<div class="star star-1"></div>
<div class="star star-2"></div>
<div class="star star-3"></div>
<div class="star star-4"></div>
<div class="star star-5"></div>
<div class="first-moon"></div>
</div>
<div class="sand"></div>
<div class="bb8">
<div class="antennas">
<div class="antenna short"></div>
<div class="antenna long"></div>
</div>
<div class="head">
<div class="stripe one"></div>
<div class="stripe two"></div>
<div class="eyes">
<div class="eye one"></div>
<div class="eye two"></div>
</div>
<div class="stripe detail">
<div class="detail zero"></div>
<div class="detail zero"></div>
<div class="detail one"></div>
<div class="detail two"></div>
<div class="detail three"></div>
<div class="detail four"></div>
<div class="detail five"></div>
<div class="detail five"></div>
</div>
<div class="stripe three"></div>
</div>
<div class="ball">
<div class="lines one"></div>
<div class="lines two"></div>
<div class="ring one"></div>
<div class="ring two"></div>
<div class="ring three"></div>
</div>
<div class="shadow"></div>
</div>
</div>
</label>
<label>
<input type="checkbox" class="slider">
<div class="switch">
<div class="suns"></div>
<div class="moons">
<div class="star star-1"></div>
<div class="star star-2"></div>
<div class="star star-3"></div>
<div class="star star-4"></div>
<div class="star star-5"></div>
<div class="first-moon"></div>
</div>
<div class="sand"></div>
<div class="bb8">
<div class="antennas">
<div class="antenna short"></div>
<div class="antenna long"></div>
</div>
<div class="head">
<div class="stripe one"></div>
<div class="stripe two"></div>
<div class="eyes">
<div class="eye one"></div>
<div class="eye two"></div>
</div>
<div class="stripe detail">
<div class="detail zero"></div>
<div class="detail zero"></div>
<div class="detail one"></div>
<div class="detail two"></div>
<div class="detail three"></div>
<div class="detail four"></div>
<div class="detail five"></div>
<div class="detail five"></div>
</div>
<div class="stripe three"></div>
</div>
<div class="ball">
<div class="lines one"></div>
<div class="lines two"></div>
<div class="ring one"></div>
<div class="ring two"></div>
<div class="ring three"></div>
</div>
<div class="shadow"></div>
</div>
</div>
</label>
👍2
Dev_html
Photo
Css :-
.switch {
--toggle-size: 1;
}
.switch *, .switch *::after, *::before {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.switch {
-webkit-box-sizing: border-box;
box-sizing: border-box;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
width: 170px;
height: 90px;
background-color: #b7cecc;
position: relative;
border-radius: 999px;
-webkit-transition: .4s;
-o-transition: .4s;
transition: .4s;
cursor: pointer;
-webkit-transform: scale(var(--toggle-size));
-ms-transform: scale(var(--toggle-size));
transform: scale(var(--toggle-size));
}
.moons {
position: absolute;
width: 100px;
height: 65px;
overflow: hidden;
top: 0;
left: -10px;
}
.moons .star {
position: absolute;
width: 1px;
height: 1px;
top: 45px;
left: 30px;
border-radius: 999px;
background-color: #ffffff;
}
.moons .star.star-1 {
top: 100%;
left: 75px;
-webkit-transition: .2s;
-o-transition: .2s;
transition: .2s;
}
.moons .star.star-2 {
top: 100%;
left: 65px;
-webkit-transition: .3s;
-o-transition: .3s;
transition: .3s;
}
.moons .star.star-3 {
top: 100%;
left: 85px;
-webkit-transition: .4s;
-o-transition: .4s;
transition: .4s;
}
.moons .star.star-4 {
top: 100%;
left: 60px;
-webkit-transition: .5s;
-o-transition: .5s;
transition: .5s;
}
.moons .star.star-5 {
top: 100%;
left: 44px;
-webkit-transition: .6s;
-o-transition: .6s;
transition: .6s;
}
.moons .first-moon {
position: absolute;
-webkit-transition: .4s;
-o-transition: .4s;
transition: .4s;
width: 30px;
height: 30px;
top: 100%;
left: 30px;
background-color: #e0d6d6;
border-radius: 999px;
}
.moons::before, .moons::after {
-webkit-transition: .6s;
-o-transition: .6s;
transition: .6s;
content: "";
position: absolute;
width: 8px;
height: 8px;
background-color: #dde4e6;
border-radius: 999px;
top: 100%;
left: 70px;
}
.moons::after {
width: 5px;
height: 5px;
left: 81px;
-webkit-transition: .8s;
-o-transition: .8s;
transition: .8s;
}
.sand {
position: absolute;
width: 100%;
height: 45px;
bottom: 0px;
left: 0;
border-radius: 0 0 999px 999px;
overflow: hidden;
}
.suns {
position: absolute;
width: 50px;
height: 70px;
overflow: hidden;
top: 0;
right: 15px;
}
.suns::before {
content: "";
position: absolute;
width: 20px;
height: 20px;
background-color: #faddef;
border-radius: 999px;
top: 10px;
right: 30px;
-webkit-transition: .4s;
-o-transition: .4s;
transition: .4s;
}
.suns::after {
content: "";
position: absolute;
width: 20px;
height: 20px;
background-color: #F65604;
border-radius: 999px;
top: 38px;
right: 10px;
-webkit-transition: .6s;
-o-transition: .6s;
transition: .6s;
}
.sand::before {
position: absolute;
width: 100%;
height: 25px;
bottom: 0px;
left: 0;
content: "";
background-color: #B69C77;
border-radius: 0 0 999px 999px;
}
.bb8 {
position: absolute;
left: -18%;
width: 140px;
-webkit-transform: scale(0.45);
-ms-transform: scale(0.45);
transform: scale(0.45);
-webkit-transition: left .4s;
-o-transition: left .4s;
transition: left .4s;
}
.slider {
display: none;
}
.antennas {
position: absolute;
-webkit-transition: all 0.4s;
-o-transition: all 0.4s;
transition: all 0.4s;
left: 28%;
}
.antenna {
background: #e0d2be;
position: absolute;
width: 2px;
}
.antenna.short {
height: 20px;
top: -65px;
left: 50px;
}
.antenna.long {
border-top: 6px solid #020204;
border-bottom: 6px solid #020204;
height: 36px;
top: -80px;
left: 56px;
}
.head {
-webkit-transition: -webkit-transform .4s;
transition: -webkit-transform .4s;
.switch {
--toggle-size: 1;
}
.switch *, .switch *::after, *::before {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.switch {
-webkit-box-sizing: border-box;
box-sizing: border-box;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
width: 170px;
height: 90px;
background-color: #b7cecc;
position: relative;
border-radius: 999px;
-webkit-transition: .4s;
-o-transition: .4s;
transition: .4s;
cursor: pointer;
-webkit-transform: scale(var(--toggle-size));
-ms-transform: scale(var(--toggle-size));
transform: scale(var(--toggle-size));
}
.moons {
position: absolute;
width: 100px;
height: 65px;
overflow: hidden;
top: 0;
left: -10px;
}
.moons .star {
position: absolute;
width: 1px;
height: 1px;
top: 45px;
left: 30px;
border-radius: 999px;
background-color: #ffffff;
}
.moons .star.star-1 {
top: 100%;
left: 75px;
-webkit-transition: .2s;
-o-transition: .2s;
transition: .2s;
}
.moons .star.star-2 {
top: 100%;
left: 65px;
-webkit-transition: .3s;
-o-transition: .3s;
transition: .3s;
}
.moons .star.star-3 {
top: 100%;
left: 85px;
-webkit-transition: .4s;
-o-transition: .4s;
transition: .4s;
}
.moons .star.star-4 {
top: 100%;
left: 60px;
-webkit-transition: .5s;
-o-transition: .5s;
transition: .5s;
}
.moons .star.star-5 {
top: 100%;
left: 44px;
-webkit-transition: .6s;
-o-transition: .6s;
transition: .6s;
}
.moons .first-moon {
position: absolute;
-webkit-transition: .4s;
-o-transition: .4s;
transition: .4s;
width: 30px;
height: 30px;
top: 100%;
left: 30px;
background-color: #e0d6d6;
border-radius: 999px;
}
.moons::before, .moons::after {
-webkit-transition: .6s;
-o-transition: .6s;
transition: .6s;
content: "";
position: absolute;
width: 8px;
height: 8px;
background-color: #dde4e6;
border-radius: 999px;
top: 100%;
left: 70px;
}
.moons::after {
width: 5px;
height: 5px;
left: 81px;
-webkit-transition: .8s;
-o-transition: .8s;
transition: .8s;
}
.sand {
position: absolute;
width: 100%;
height: 45px;
bottom: 0px;
left: 0;
border-radius: 0 0 999px 999px;
overflow: hidden;
}
.suns {
position: absolute;
width: 50px;
height: 70px;
overflow: hidden;
top: 0;
right: 15px;
}
.suns::before {
content: "";
position: absolute;
width: 20px;
height: 20px;
background-color: #faddef;
border-radius: 999px;
top: 10px;
right: 30px;
-webkit-transition: .4s;
-o-transition: .4s;
transition: .4s;
}
.suns::after {
content: "";
position: absolute;
width: 20px;
height: 20px;
background-color: #F65604;
border-radius: 999px;
top: 38px;
right: 10px;
-webkit-transition: .6s;
-o-transition: .6s;
transition: .6s;
}
.sand::before {
position: absolute;
width: 100%;
height: 25px;
bottom: 0px;
left: 0;
content: "";
background-color: #B69C77;
border-radius: 0 0 999px 999px;
}
.bb8 {
position: absolute;
left: -18%;
width: 140px;
-webkit-transform: scale(0.45);
-ms-transform: scale(0.45);
transform: scale(0.45);
-webkit-transition: left .4s;
-o-transition: left .4s;
transition: left .4s;
}
.slider {
display: none;
}
.antennas {
position: absolute;
-webkit-transition: all 0.4s;
-o-transition: all 0.4s;
transition: all 0.4s;
left: 28%;
}
.antenna {
background: #e0d2be;
position: absolute;
width: 2px;
}
.antenna.short {
height: 20px;
top: -65px;
left: 50px;
}
.antenna.long {
border-top: 6px solid #020204;
border-bottom: 6px solid #020204;
height: 36px;
top: -80px;
left: 56px;
}
.head {
-webkit-transition: -webkit-transform .4s;
transition: -webkit-transform .4s;