代码里多了 ,让论坛回帖的排版都有点歪了,帮你删掉了
谢谢红影!{:4_171:}
<style type="text/css">
.paBox { /* 父框 */
margin: 10px auto;
width: 1024px;
height: 640px;
position: relative;
background: #000 url('https://pic.imgdb.cn/item/6201f01e2ab3f51d91be2caf.jpg') no-repeat;
left: -200px;
top: 150px
}
/* 父框和 .soBox 的伪元素共同样式 */
.paBox::before, .paBox::after, .soBox::before, .soBox::after {
content: "";
position: absolute;
width: 500px; height: 2px;
background: silver;
left: 540px; top: 80px;
opacity: 0.1;
transform-origin: center center;
}
/* 父框和 .soBox 的伪元素各自的动画样式 */
.paBox::before { animation: fly 2s linear infinite alternate;}
.paBox::after { height: 4px; animation: fly 5s linear infinite;}
.soBox::before { animation: fly 3s linear infinite;}
.soBox::after { height: 5px; animation: fly 1s linear infinite alternate;}
@keyframes fly { 100% { transform: rotate(360deg); } }
/*旋转按钮*/
.roBox40 {
margin: 10px;
position: relative;
width: 40px; height: 40px;
line-height: 40px; font-size: 14px;
background: linear-gradient(Teal,gray,red);
outline:none;
color: white;
border-radius: 50%;
text-align: center;
box-shadow: 0px 0px 0px 1px rgba(0,0,0,0.25);
cursor: pointer;
animation: rol linear 2s infinite;
}
.roBox40:hover { opacity: 0.8; }
.roBox40:active { opacity: 1; }
@keyframes rol { to { transform:rotate(360deg); } }
</style>
<div class="paBox">
<div class="soBox"></div>
<p style="position: absolute; left:50px; top:100px; color: #e12325;"><marqueescrollamount="2" direction="left" ><font face="微软雅黑"><font size="4">一条长长的哈达 托起苍莽雪山嘿喜马拉雅</font></marquee></p>
<!-- 按钮 -->
<div id="roBox" class="roBox40" style="left:15%;top:82%;">●</div>
</div>
<audio id="ymusic" src="https://www.joy127.com/url/88577.mp3" autoplay="autoplay" loop="loop"></audio>
<script language="javascript">
var mu = document.getElementById('ymusic');
var roBtn = document.getElementById('roBox');
mu.autoplay ? roBtn.style.animationPlayState="running" : roBtn.style.animationPlayState="paused";
mu.addEventListener("ended", function(){ roBtn.style.animationPlayState="paused"; })
roBtn.onclick = function(){ mu.paused ? (mu.play(), roBtn.style.animationPlayState="running") : (mu.pause(), roBtn.style.animationPlayState="paused"); }
</script>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
加林森 发表于 2022-1-7 12:28
挺快的
我用十一代更快 马黑黑 发表于 2022-1-7 14:16
我用十一代更快
知道知道,原来用过的。
页:
1
[2]