|
|

楼主 |
发表于 2021-10-1 21:40
|
显示全部楼层
本帖最后由 加林森 于 2022-4-10 21:47 编辑
不客气啊。同喜同乐!
水滴代码
<style>
/* 底图 */
.stage {
top:120px;left:-202px;
position: relative;
width: 1024px;
height: 600px;
background: #FFF url('https://pic.imgdb.cn/item/6252d13e239250f7c5275237.jpg') no-repeat center/cover;
box-shadow: 4px 4px 5px #888;
border-radius:12px;
}
/* 涟漪 */
.lianyi {
position: absolute;
background: transparent;
border: 1px solid #eee;
border-radius: 50%;
box-shadow: 0px 0px 6px #fff inset, 0 0 8px #000;
position: absolute;
opacity: 0;
}
.lianyi1 {
width: 60px;
height: 60px;
left: 400px;
top: 650px;
animation: circle 1.8s 1.8s linear infinite;
}
.lianyi2 {
width: 60px;
height: 60px;
left: 640px;
top: 620px;
animation: circle2 2.5s 2.5s linear infinite;
}
.lianyi3 {
width: 60px;
height: 60px;
left: 840px;
top: 662px;
animation: circle3 2.0s 1.8s linear infinite;
}
/* 水滴 */
.wdrop {
position: absolute;
border-radius: 80% 0 55% 50% / 55% 0 80% 50%;
transform: rotate(-45deg);
background-image: linear-gradient(45deg, #8CA2FB 0%, #F0F0FD 100%);
}
.wdrop::after {
content: '';
width: 50%;
height: 50%;
position: absolute;
left: 10%; top: 20%;
border-radius: 50%;
background: radial-gradient(circle at 50% 0px, #ffffff, rgba(255, 255, 255, 0) 58%);
filter: blur(5px);
}
.wdrop1 {
left: 420px;
top: 260px;
width: 20px;
height: 20px;
animation: drop 1.8s ease-in infinite;
}
.wdrop2 {
left: 660px;
top: 400px;
width: 18px;
height: 18px;
animation: drop2 2.5s ease-in infinite;
}
.wdrop3 {
left: 860px;
top: 280px;
width: 18px;
height: 18px;
animation: drop3 2.0s ease-in infinite;
}
/* 动画 */
@keyframes drop{
0% { top: 260px; }
100% { top: 650px; }
}
@keyframes circle {
0% { opacity: 0.1; }
100% { transform: scale(3, 1.2); opacity: 0; }
}
@keyframes drop2{
0% { top: 400px; }
100% { top: 620px; }
}
@keyframes circle2 {
0% { opacity: 0.1; }
100% { transform: scale(3, 1); opacity: 0; }
}
@keyframes drop3{
0% { top: 280px; }
100% { top: 662px; }
}
@keyframes circle3 {
0% { opacity: 0.1; }
100% { transform: scale(3, 1); opacity: 0; }
}
/* 音乐控制按钮 */
.picBtn {
position: absolute;
width: 100px;
height: 100px;
left: 100px;
top: 580px;
border: none;
outline: none;
border-radius: 8px;
background: transparent url('https://pic.imgdb.cn/item/624fbfd5239250f7c5c20bdc.gif') no-repeat;
cursor: pointer;
}
/* 旋转魔方 */
.cude {
--xyz: 80px;
--bb: -40px;
width: var(--xyz);
height: var(--xyz);
position: absolute;
left: 260px; top: 490px;
transform-style: preserve-3d;
transform: rotateX(-30deg) rotateY(-80deg);
transform-origin: 50% 50% 0;
animation: rot 10s linear infinite;
}
.pae {
position: absolute;
left: 0; top: 0;
width: var(--xyz); height: var(--xyz);
background: blue;
opacity: .15;
font: bold 40px / var(--xyz) Arial;
color: #fff;
text-align: center;
text-shadow: 1px 1px 2px #000;
border:1px solid #333;
}
.front { transform: rotateY(0) translateZ(calc(var(--xyz) / 2)); }
.back { transform: translateZ(var(--bb)) rotateY(180deg); }
.left { transform: rotateY(-90deg) translateZ(calc(var(--xyz) / 2)); }
.right { transform: rotateY(90deg) translateZ(calc(var(--xyz) / 2)); }
.top { transform: rotateX(90deg) translateZ(calc(var(--xyz) / 2)); }
.bottom { transform: rotateX(90deg) translateZ(var(--bb)); }
@-webkit-keyframes rot {
from { transform: rotateX(0deg) rotateY(0deg); }
to { transform: rotateX(360deg) rotateY(360deg); }
}
</style>
<div class="stage">
<div class="wdrop wdrop1"></div><div class="lianyi lianyi1"></div>
<div class="wdrop wdrop2"></div><div class="lianyi lianyi2"></div>
<div class="wdrop wdrop3"></div><div class="lianyi lianyi3"></div>
<div style="position: absolute; left:540px; top: 60px; width:650px;">
<img alt="" src="https://pic.imgdb.cn/item/624f9886239250f7c55c810d.gif"/></div>
<button id="picBtn" class="picBtn"></button>
<div class="cude">
<div class="pae front">出</div>
<div class="pae left">水</div>
<div class="pae right">莲</div>
<div class="pae bottom">出</div>
<div class="pae top">水</div>
<div class="pae back">莲</div>
</div>
</div>
<audio id="music" src="//music.163.com/outchain/player?type=2&id=5265056&auto=1&height=66" loop="loop"
autoplay="autoplay" ></audio>
</div><br><br><br><br><br>
<script language="javascript">
|
|