|
代码:
<style type="text/css">
.mumBox{
width: 100%;
min-height: 400px;
background: #333;
position: relative;
}
.leaf {
position: relative;
left: calc(50% - 100px);
top: 5px;
width: 200px;
height: 200px;
border-radius: 10% 100% 10% 100% / 0 100% 0 100%;
background: linear-gradient(45deg,green 49%,transparent 50%,green 50%);
transform-origin: 0 0;
animation: swift 5s ease-in infinite;
}
.leaf::before, .leaf::after { content: ''; position: absolute; }
.leaf::before {
width: 30px;
height: 8px;
background: olive;
opacity: .75;
border-radius: 1px;
left: -25px;
top: -5px;
transform: rotate(15deg);
}
.leaf::after {
width: 25px;
height: 20px;
border-radius: 50%;
background: #eee;
opacity: 0.4;
left: 25%;
top: 25%;
animation: bigger 5s linear infinite;
}
@keyframes bigger {
0% { left: -10px;top: -10px; width: 10px; height: 8px; opacity: .1; }
10% { left: 25%;top: 25%; width: 10px; height: 15px; opacity: .2 }
20% { left: 65%; top: 64%; width: 20px; height: 20px; opacity: .3 }
30% { left: 65%; top: 64%; width: 30px; height: 35px; opacity: .4 }
40% { left: 65%; top: 64%; width: 35px; height: 38px; opacity: .4 }
50% { left: 65%; top: 64%; width: 40px; height: 48px; opacity: .4 }
60% { left: 65%; top: 64%; width: 45px; height: 50px; opacity: .4 }
70% { left: 70%; top: 70%; width: 50px; height: 45px; opacity: .3 }
80% { left: 70%; top: 70%; width: 45px; height: 55px; opacity: .2 }
90% { left: 70%; top: 80%; width: 50px; height: 50px; opacity: .1 }
100% { left: 70%; top: 80%; width: 50px; height: 60px; opacity: 0 }
}
@keyframes swift {
to { transform: rotate(5deg); }
}
</style>
<div class="mumBox">
<div class="leaf"></div>
</div>
|