|
|

楼主 |
发表于 2022-3-14 20:06
|
显示全部楼层
好啊,我去把这个帖子的代码贴出来
- <style tpye="text/css">
- #xq { position: relative; left:-204px;top:120px; width: 1024px; height: 684px; background:#333 url('https://pic.imgdb.cn/item/622dc0cf5baa1a80ab43cd0d.jpg') no-repeat center/cover; box-shadow: 4px 4px 5px #888;border-radius:12px; }
- body { overflow-x: hidden; } /*禁用横向滚动条 */
- #baiBox {
- margin: auto;
- width: 360px;
- text-align: center;
- font-size: 5rem;
- font-weight: bold;
- color: #EEEE00;
- transform-origin: top;
- animation: yao 0.8s linear infinite alternate;
- }
- @keyframes yao {
- from{ transform: perspective(800px) rotatex(30deg); }
- to { transform: perspective(800px) rotatex(-30deg); }
- }
- .picBtn {
-
- width: 120px;
- height: 120px;
- border: none;
- outline: none;
- border-radius: 8px;
- background: transparent url('https://pic.imgdb.cn/item/622db6215baa1a80ab3dff55.gif') no-repeat;
- cursor: pointer;
- </style>
- <div id="xq" >
- <div id="baiBox" style="position: absolute; left:120px; top: 40px; ">心情不错</div>
- <div style="position: absolute; left:120px; top: 150px; width:400px;text-align:center;">
- <img alt="" src="http://image.hnol.net/c/2021-01/10/10/202101101019478794-5088534.gif"/>
- <div style="position:absolute; width:160px; left:560px; top: 60px; text-align:center;">
- <center >
- <p ><font color="#ffffff" size="4" >
- <div style="color:#ffffff;margin:0px;padding:10px;font-size:5px;font-family:微软雅黑;text-shadow:1px 1px 1px #000000;">
- <marquee scrollamount="5" direction="left" >把一首轻松的歌儿送给羽儿,感谢你的好礼,祝福每一天《心情不错》 </marquee>
- <p><audio id="music" src="http://www.kumeiwp.com/sub/filestores/2022/03/13/f088571586e027f5d98fc83817dd9f53.mp3" loop="loop" autoplay="autoplay" ></audio><br></p>
- <div style="position:absolute; width:120px; left:110px; top: 250px; text-align:center;">
- <button id="picBtn" class="picBtn"></button>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script language="javascript">
- var mu = document.getElementById('music');
- var btn = document.getElementById('picBtn');
- btn.onclick = function(){
- mu.paused ? (mu.play(), btn.style.background="url('https://pic.imgdb.cn/item/622db6215baa1a80ab3dff55.gif')") : (mu.pause(), btn.style.background="url('https://pic.imgdb.cn/item/622db73d5baa1a80ab3e783b.gif')");
- }
- mu.addEventListener("ended", function(){
- btn.style.background="url('https://pic.imgdb.cn/item/622db73d5baa1a80ab3e783b.gif')";
- })
- </script></div>
- <br><br><br><br><br><br><br><br>
复制代码 |
|