加林森 发表于 2022-7-27 08:11

【中伏消暑】第二天 尘:《尘埃》- 王雨桐


<style>
#papa {
      margin: auto;
      width: 1024px;
      height: 640px;
      left: -214px;
      background: #ccc url('https://pic.imgdb.cn/item/62dfb202f54cd3f937c39e41.jpg');
      box-shadow: 3px 3px 20px #000;
      border-radius: 6px;
      background-blend-mode: overlay, overlay, overlay, multiply, normal;
      box-shadow: 4px 4px 28px #000;
      position: relative;
}
#bird {
      position: absolute;
      width: 73px;
      height: 83px;
      left: 50%;
      top: 500px;
      transition: left 2s, top 2s;
}
</style>


<div id="papa">
      <div>
      <p>尘埃 - 王雨桐</p>
      <img id="bird" src="https://pic.imgdb.cn/item/6247e3c027f86abb2a56f17a.gif" alt="" />
      <audio id="aud" src="https://music.163.com/song/media/outer/url?id=1426959223.mp3" autoplay="autoplay" loop="loop"></audio>
         </div>
</div>


<script>


let lastX = 0;
document.addEventListener('click', (e) => {
      e = event || window.event;
      let x = e.pageX, y = e.pageY,
                w = document.body.clientWidth, h = document.body.clientHeight,
                bw = bird.offsetWidth, bh = bird.offsetHeight;
      x = x - offset(papa, 'left');
      y = y - offset(papa, 'top');
      if(x + bw >= w) x = w - bw;
      if(y + bh >= h) y = h - bh;
      bird.style.transform = x > lastX ? 'rotateY(0deg)' : 'rotateY(-180deg)';
      lastX = x;
      bird.style.left = x + 'px';
      bird.style.top = y + 'px';
});


function offset(obj,direction){//偏移总量
      let offsetDir = "offset" + direction.toUpperCase()+direction.substring(1);
      let realNum = obj;
      let positionParent = obj.offsetParent;
      while(positionParent != null){
                realNum += positionParent;
                positionParent = positionParent.offsetParent;
      }
      return realNum;
}


</script>

樵歌 发表于 2022-7-28 06:47

加林森 发表于 2022-7-27 21:05
必须的~

学一回扬大侠{:4_174:}

浣溪沙 发表于 2022-7-27 08:47

好听好看好玩,一片清爽的世界,雄鹰看着我打字,哈哈哈,感觉好极{:4_178:}

浣溪沙 发表于 2022-7-27 08:47

{:4_199:}{:4_199:}{:4_199:}

加林森 发表于 2022-7-27 08:50

浣溪沙 发表于 2022-7-27 08:47
好听好看好玩,一片清爽的世界,雄鹰看着我打字,哈哈哈,感觉好极

谢谢沙沙。好玩吧!

加林森 发表于 2022-7-27 08:50

浣溪沙 发表于 2022-7-27 08:47


{:4_190:}

梦油 发表于 2022-7-27 10:40

本帖最后由 梦油 于 2022-7-27 10:41 编辑

淡蓝的天空真美。
   俺没分了
{:4_201:}

加林森 发表于 2022-7-27 11:00

梦油 发表于 2022-7-27 10:40
淡蓝的天空真美。
   俺没分了

你欣赏就好!

樵歌 发表于 2022-7-27 11:24

在蓝天白云下轻松写意!{:4_189:}

加林森 发表于 2022-7-27 11:26

樵歌 发表于 2022-7-27 11:24
在蓝天白云下轻松写意!

玩玩鹰。{:4_189:}

转转 发表于 2022-7-27 18:12

洁净世界,凉爽天地,好看好玩{:4_172:}

转转 发表于 2022-7-27 18:13

我想把这只鹰带走{:4_172:}

加林森 发表于 2022-7-27 19:07

转转 发表于 2022-7-27 18:12
洁净世界,凉爽天地,好看好玩

嗯嗯。转转也喜欢啊。

加林森 发表于 2022-7-27 19:08

转转 发表于 2022-7-27 18:13
我想把这只鹰带走

抓到没有?{:4_172:}

转转 发表于 2022-7-27 19:29

加林森 发表于 2022-7-27 19:08
抓到没有?

木抓住{:4_172:}它比我飞得好{:4_172:}

加林森 发表于 2022-7-27 20:44

转转 发表于 2022-7-27 19:29
木抓住它比我飞得好

我就知道你抓不住的。{:4_189:}

樵歌 发表于 2022-7-27 20:53

加林森 发表于 2022-7-27 11:26
玩玩鹰。

带着鹰儿走天涯{:4_173:}

加林森 发表于 2022-7-27 21:05

樵歌 发表于 2022-7-27 20:53
带着鹰儿走天涯

必须的~{:4_189:}

红影 发表于 2022-7-27 22:16

队长这次的鹰是正向飞了,很赞{:4_187:}

加林森 发表于 2022-7-27 22:21

红影 发表于 2022-7-27 22:16
队长这次的鹰是正向飞了,很赞

我训练了那么久了,现在它很听话了。{:4_189:}
页: [1] 2
查看完整版本: 【中伏消暑】第二天 尘:《尘埃》- 王雨桐