本帖最后由 马黑黑 于 2022-3-31 12:56 编辑
原创代码分享:
<style>
.stage {
margin: auto;
position: relative;
max-width: 600px;
min-height: 400px;
background: linear-gradient(olive, gray, blue);
}
.stage::after {
content: '';
width: 40px;
height: 40px;
background: transparent;
border: 1px solid #eee;
border-radius: 50%;
box-shadow: 0px 0px 4px #eee inset, 0 0 6px blue;
position: absolute;
left: calc(50% - 20px);
top: 300px;
opacity: 0;
animation: circle 1.5s 1.5s linear infinite;
}
.wdrop {
position: absolute;
left: calc(50% - 10px);
top: -20px;
width: 20px;
height: 20px;
border-radius: 80% 0 55% 50% / 55% 0 80% 50%;
transform: rotate(-45deg);
background-image: linear-gradient(45deg, #32c415 0%, #f09 100%);
animation: drop 1.5s ease-in infinite;
}
@keyframes drop{
0% { top: -20px; }
100% { top: 300px; }
}
@keyframes circle {
0% { opacity: 0.1; }
100% { transform: scale(3, 1.2); opacity: 0; }
}
</style>
<div class="stage">
<div class="wdrop"></div>
</div>
|