|
|
请马上登录,朋友们都在花潮里等着你哦:)
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 马黑黑 于 2022-5-20 13:00 编辑
修改了队长的代码,就按这个:
- <style>
- .outerbox {
- position: relative;
- left: -242px;
- display: flex;
- justify-content: center;
- align-items: center;
- width: 1080px;
- height: 666px;
- background: #888 url('https://pic.imgdb.cn/item/6286f8d809475431290823e9.jpg') no-repeat center/cover;
- box-shadow: 2px 2px 8px rgba(0,0,0,.95);
- perspective: 3000px;
- }
- .innerbox {
- background: #666;
- box-shadow: 2px 2px 6px rgba(0,0,0,.85);
- transform-style: preserve-3d;
- animation: flyout 6s linear infinite alternate;
- }
- @keyframes flyout {
- 0% { transform: rotate(0turn); width: 1px; height: 1px; }
- 80%, 100% { transform: rotate(2turn); width: 600px; height: 600px; }
- }
- </style>
- <div class="outerbox">
- <div class="innerbox"></div>
- </div>
- <script>
- let picAr = [
- 'https://pic.imgdb.cn/item/6286f9ce0947543129098349.jpg',
- 'https://pic.imgdb.cn/item/6286fa9f09475431290ad48e.jpg',
- 'https://pic.imgdb.cn/item/6286fb2809475431290b5d51.jpg',
- 'https://pic.imgdb.cn/item/6286fbb809475431290bb0aa.jpg',
- 'https://pic.imgdb.cn/item/6286fc9109475431290c3227.jpg'
- ];
- let idx = 0;
- let outer = document.querySelector('.outerbox');
- let inner = document.querySelector('.innerbox');
- let aud = document.createElement('iframe');
- aud.src = 'https://music.163.com/outchain/player?type=2&id=1359398436&auto=1&height=66';
- aud.style.display = 'none';
- outer.appendChild(aud);
- setBgImg();
- setInterval(setBgImg, 12000);
- function setBgImg(){
- inner.style = `background: url(${picAr[idx]}) no-repeat center/cover`;
- idx += 1;
- if(idx >= picAr.length) idx = 0;
- }
- </script>
复制代码
|
评分
-
| 参与人数 4 | 威望 +160 |
金钱 +320 |
经验 +160 |
收起
理由
|
小辣椒
| + 50 |
+ 100 |
+ 50 |
赞一个! |
加林森
| + 30 |
+ 60 |
+ 30 |
很给力! |
岩新新
| + 30 |
+ 60 |
+ 30 |
赞一个! |
红影
| + 50 |
+ 100 |
+ 50 |
赞一个! |
查看全部评分
|