CSS效果之扁平化的Loading效果
<!-- run -->
<style>
@import url("https://fonts.googleapis.com/css?family=Luckiest+Guy");
bg{
position: absolute;
width: 95%;
height: 98%;
background-color: skyblue;
background-attachment: fixed;
background-size: 100% 100%;
font-family: "Luckiest Guy", cursive;
}
body::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 0;
height: 0;
margin: auto;
border-radius: 100%;
background: transparent;
display: block;
box-shadow: 0 0 150px 100px rgba(255, 255, 255, 0.6),
200px 0 200px 150px rgba(255, 255, 255, 0.6),
-250px 0 300px 150px rgba(255, 255, 255, 0.6),
550px 0 300px 200px rgba(255, 255, 255, 0.6),
-550px 0 300px 200px rgba(255, 255, 255, 0.6);
}
h1 {
cursor: default;
position: absolute;
top: 0;
left: 0;
bottom: 0;
width: 100%;
height: 100px;
margin: auto;
display: block;
text-align: center;
}
h1 span {
position: relative;
top: 20px;
display: inline-block;
font-size: 80px;
color: #fff;
text-shadow: 0 1px 0 #ccc, 0 2px 0 #ccc, 0 3px 0 #ccc, 0 4px 0 #ccc, 0 5px 0 #ccc, 0 6px 0 transparent, 0 7px 0 transparent, 0 8px 0 transparent, 0 9px 0 transparent, 0 10px 10px rgba(0, 0, 0, 0.4);
animation: bounce 0.3s ease infinite alternate;
}
@keyframes bounce {
100% {
top: -20px;
text-shadow: 0 1px 0 #ccc, 0 2px 0 #ccc, 0 3px 0 #ccc, 0 4px 0 #ccc, 0 5px 0 #ccc, 0 6px 0 #ccc, 0 7px 0 #ccc, 0 8px 0 #ccc, 0 9px 0 #ccc, 0 50px 25px rgba(0, 0, 0, 0.2);
}
}
h1 span:nth-child(2) {
animation-delay: 0.1s;
}
h1 span:nth-child(3) {
animation-delay: 0.2s;
}
h1 span:nth-child(4) {
animation-delay: 0.3s;
}
h1 span:nth-child(5) {
animation-delay: 0.4s;
}
h1 span:nth-child(6) {
animation-delay: 0.5s;
}
h1 span:nth-child(7) {
animation-delay: 0.6s;
}
h1 span:nth-child(8) {
animation-delay: 0.7s;
}
h1 span:nth-child(9) {
animation-delay: 0.8s;
}
</style>
<div class="bg">
<h1>
<span>l</span>
<span>o</span>
<span>a</span>
<span>d</span>
<span>i</span>
<span>n</span>
<span>g</span>
<span>.</span>
<span>.</span>
<span>.</span>
</h1>
</div>
未经作者授权,禁止转载
本文来自博客园,作者:CoderWGB,转载请注明原文链接:https://www.cnblogs.com/wgb1234/articles/16852335.html
THE END

浙公网安备 33010602011771号