加林森 发表于 2021-10-1 18:16

本帖最后由 加林森 于 2022-3-26 21:31 编辑 <br /><br />辫子哥哥 发表于 2021-10-1 11:17
队长别太累,玩论坛就要细水长流,开心就好
好的好的,节日快乐!

<style type="text/css">
/* 帖子容器 */
#tzDiv {
      position: relative;
      left: -214px;
      width: 1024px;
      height: 600px;
      top: 80px;
      background: #eee url('https://pic.imgdb.cn/item/623f0c9b27f86abb2a8af90c.jpg') no-repeat center/cover;
      opacity: 0.8;
}
/* 音乐控制按钮 */
.picBtn {
      position: absolute;
       width: 100px;
       height: 100px;
       left: 180px;
       bottom: 60px;
       border: none;
       outline: none;
       border-radius: 8px;
       background: transparent url('https://pic.imgdb.cn/item/622a00ea5baa1a80ab412ada.gif') no-repeat;
       cursor: pointer;
}
/* 文本时钟 */
#textClock {
      position: absolute;
      top: 180px;
      right: 200px;
      width: 300px;
      height: 30px;
      font: 20px / 30px Sans-Serif;
      text-align: center;
}
/* 走马灯父框 */
.txtFly {
      position: absolute;
      width: 260px;
      height: 30px;
      right: 100px;
      bottom: 100px;
      overflow: hidden;
}
/* 走马灯文本 */
.txtFly div {
      position: absolute;
      left: 260px;
      font: normal 18px /20px Sans-Serif;
      word-break: keep-all;
      white-space:nowrap;
}
/* 变色文本 */
.txtBg {
      position: absolute;
      top: 80px;
      right: 100px;
      font-size: 4rem;
      color: transparent;
      width: 500px;
      height: 100px;
      line-height: 100px;
      text-align: center;
      background-image: linear-gradient(90deg, green, olive, transparent, tomato, green);
      background-size: 500px 100px;
      background-position: 500px 0;
      border: 1px solid;
      background-clip: text;
      -webkit-background-clip: text;
      animation: chgc 2s linear infinite;
}
/* 文本变色动画 */
@keyframes chgc {
      from { background-position: -500px 0; }
      to { background-position: 0 0; }
}
</style>

<div id="tzDiv">
      <div class="txtBg">LETTING GO</div>
      <div id="textClock"></div>
      <div class="txtFly">
                <div id="ziFly">LETTING GO - 蔡健雅 这是一封离别信

写下我该离开的原因

我在你生命中扮演的角色太模糊了

你对我常忽冷忽热

我到底是情人还是朋友

爱你是否不该太认真

That’s why

I’m letting go。。。。。。</div>
      </div>
      <button id="picBtn" class="picBtn"></button>
      <audio id="music" src="http://www.kumeiwp.com/sub/filestores/2022/01/16/943220ffea171395f83c82f63169d7ac.mp3" loop="loop" autoplay="autoplay" ></audio>
</div>

<script language="javascript">

fly(); //运行走马灯
showTime(); //显示时间
setInterval(showTime, 1000); //运行时钟

//文本时钟函数
function showTime(){
      var now = new Date();
      var year = now.getFullYear();
      var month = now.getMonth() + 1;
      var date = now.getDate();
      var day = now.getDay();
      var hour = now.getHours();
      if(hour < 10) hour = "0" + hour;
      var minute = now.getMinutes();
      if(minute < 10) minute = "0" + minute;
      var second = now.getSeconds();
      if(second < 10) second = "0" + second;
      document.getElementById("textClock").innerHTML = year + "年" + month + "月" + date + "日 星期" + toHz(day) + "" + hour + ":" + minute + ":" + second;
}
function toHz(num) { var hz = "日一二三四五六九"; return(hz.charAt(num)); }
//音乐控制代码
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/622a00ea5baa1a80ab412ada.gif')") : (mu.pause(), btn.style.background="url('https://pic.imgdb.cn/item/622a01115baa1a80ab414665.png')");
}

mu.addEventListener("ended", function(){
      btn.style.background="url('https://pic.imgdb.cn/item/622a01115baa1a80ab414665.png')";
});
//创建走马灯
function fly() {
      var ziFly = document.getElementById('ziFly');
      var width = ziFly.clientWidth;
      var style = document.createElement('style');
      style.type = 'text/css';
      var flyStr = '@keyframes fly {to { left: -' + width + 'px; } }';
      style.innerHTML = flyStr;
      ziFly.appendChild(style);
      ziFly.style.animation = 'fly 40s linear infinite';
}
</script>

加林森 发表于 2021-10-1 18:17

红影 发表于 2021-10-1 11:50
不是,是下意识地就点发送了。

嗯嗯,明白的。祝你节日快乐!{:4_204:}

加林森 发表于 2021-10-1 18:18

大猫咪 发表于 2021-10-1 13:17
队长辛苦, 注意身体啊, 节日快乐

谢谢猫猫关心。{:4_179:}
祝猫猫节日快乐!{:4_204:}

红影 发表于 2021-10-1 21:26

加林森 发表于 2021-10-1 18:17
嗯嗯,明白的。祝你节日快乐!

谢谢队长,也祝你节日快乐{:4_204:}

加林森 发表于 2021-10-1 21:40

本帖最后由 加林森 于 2022-4-10 21:47 编辑

红影 发表于 2021-10-1 21:26
谢谢队长,也祝你节日快乐
不客气啊。同喜同乐!{:4_204:}
水滴代码
<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">


页: 1 [2]
查看完整版本: 累了,睡觉去了!