花潮论坛

搜索
热搜: 活动 交友 discuz
查看: 48|回复: 4

[原创] 我心化蝶千年 - 安静

[复制链接]
  • TA的每日心情
    开心
    2024-12-15 11:29
  • 签到天数: 12 天

    [LV.3]偶尔看看II

    825

    主题

    818

    回帖

    3万

    积分

    贵宾

    Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7

    花潮帅哥鼠牛虎兔龙蛇马羊猴鸡狗猪奔放热烈春风拂面缤纷心情王者至尊大将风范金剪刀音画大师天籁妙音妙笔生花

    发表于 2022-12-19 14:45 | 显示全部楼层 |阅读模式

    请马上登录,朋友们都在花潮里等着你哦:)

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x

    评分

    参与人数 3威望 +120 金钱 +240 经验 +120 收起 理由
    小辣椒 + 50 + 100 + 50 赞一个!
    红影 + 50 + 100 + 50 赞一个!
    梦缘 + 20 + 40 + 20 很给力!

    查看全部评分

  • TA的每日心情
    开心
    2024-12-15 11:29
  • 签到天数: 12 天

    [LV.3]偶尔看看II

    825

    主题

    818

    回帖

    3万

    积分

    贵宾

    Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7

    花潮帅哥鼠牛虎兔龙蛇马羊猴鸡狗猪奔放热烈春风拂面缤纷心情王者至尊大将风范金剪刀音画大师天籁妙音妙笔生花

     楼主| 发表于 2022-12-19 14:47 | 显示全部楼层

    H5音画代码

    本帖最后由 亚伦影音工作室 于 2022-12-19 14:58 编辑

    • <div id="papa">
      <div  class="lrc">
              <ul id="ullrc">
               </ul>
      </div>
      <div  id="tx">

      <div  id="plane"> </div>
      <div  id="plane0"> </div>
      <div id="midground" ></div>


      <div id="img_border" ></div>

      </div></div>
      <audio id="aud" src="https://aimg8.dlssyht.cn/u/0/ueditor/file/0/0/1671432093430388.mp3" loop autoplay></audio>

      <style>
      #papa { margin: 30px 30px ; width: 1164px; height: 640px; background:url(https://img-baofun.zhhainiao.com ... 7f281e5f1f050ed.jpg)0px 0px/100% 100%; box-shadow: 2px 2px 2px #000; position: relative; display: grid; place-items: center; z-index: 10; overflow:hidden;}


      .lrc{
          width: 960px;
          height: 125px;
          overflow: hidden;
          display: block;position: absolute;top:500px; left:10px;z-index: 3;
          margin: 0 auto;}
      .lrc #ullrc{
      width: 100%;
      padding: 0;list-style: none;transition: 0.3s all ease;
          margin: 0;}
      /*歌词普通样式*/
      .lrc #ullrc li{
          height: 80px;
          line-height: 60px;filter:drop-shadow(#FFFfff 1px 0 0)drop-shadow(#FFFfff 0 1px 0)drop-shadow(#FFFfff -1px 0 0) drop-shadow(#FFFfff 0 -1px  0);
      font-family:悟空大字库;
          font-size: 40px;
          color: #000078;transform: translate(20%,0%);
          font-weight: normal;
          transition: .3s all ease;/*一定要加上不然看着突兀*/
          list-style-type: none;
          text-align: center;
          display: block;
          width: 100%;
          margin: 0 auto;
      }
      /*动态歌词样式*/
      .lrc #ullrc li.active{
          font-size: 40px;color: #ff0000;
        transform: translate(-20%,0%);
          font-weight: normal;-webkit-background-clip: text;
           -webkit-text-fill-color: transparent;
           
         background-image:linear-gradient(45deg, #F32121 32%,#8EE73C 43%,#FEFFFF 52%,#FEFFFF 62%,#36F4B1 75%);
           background-position: -800px 0;
           filter:drop-shadow(#000000 1px 0 0)drop-shadow(#000000 0 1px 0)drop-shadow(#000000 -1px 0 0) drop-shadow(#000000 0 -1px  0);
           -webkit-animation:loop 5s linear 1;
      }
      @-webkit-keyframes loop{
           0%{background-position: -800px 0;}
           100%{background-position: -0 0;}
      }
           
      #tx { position: absolute;
              top: 0px;
              left: 0px;z-index: 2;
              width: 1164px;
              height: 620px;
              animation: tx 2s linear infinite;
              cursor: pointer;}

      @keyframes tx {from {filter: hue-rotate(0deg);
              }
      to {filter:hue-rotate(360deg)contrast(100%)brightness(120%);}
      }
      #midground{width: 1164px;height: 620px;position: absolute;
              top: 0px;
              left: 0px;z-index: 2;
          opacity: 1;background: url("https://pic.imgdb.cn/item/639ffe7bb1fccdcd36293272.png")0 0/10% 10%;
      animation: cc 3s linear infinite;
      }
      @keyframes cc  {0% {transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg)scale(1);filter:hue-rotate(0deg)}
      90% {transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg)scale(2);filter:hue-rotate(360deg)}
      100% {transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg)scale(1);opacity: 0.4;}
      }

      #plane {position: absolute;left: -150px;top: 180px;width: 1164px;height: 620px; offset-distance: 0;
      offset-path: path("M0 20 Q 100 400, 500 200 T1164 100");background: url("https://pic.imgdb.cn/item/639ffe1fb1fccdcd3628bd35.png")0 0/50% 100%;
      animation: move 10s linear infinite;}
      #plane0 {position: absolute;left: -450px;top: 200px;width: 1164px;height: 620px;offset-distance: 0;
      offset-path: path("M0 20 Q 100 400, 500 200 T1164 100");background: url("https://pic.imgdb.cn/item/639ffe1fb1fccdcd3628bd35.png")0 0/50% 100%;
      animation: move0 10s linear infinite;}
      @keyframes move { to { offset-distance: 100%;} }
      @keyframes move0 { to { offset-distance: 100%;} }
      #img_border{display:inline-block;width:150px;height:150px;position: absolute;top:460px; left:900px;z-index: 6; transition: .3s all ease;animation:rotating 10s linear infinite;background:url(https://pic.imgdb.cn/item/639c602fb1fccdcd36980aad.png)0px 0px/100% 100%;border-radius:0%;}
      @keyframes rotating  {
      0%{transform: rotate(-360deg);}
      100%{transform: rotate(0deg);}
      }
      </style>

      <script >var lrc = `[00:00]我心化蝶千年 - 安静
      [00:06]词:蓝月
      [00:12]曲:安静
      [00:18]编曲:于洋
      [00:25]后期:大卫
      [00:31]我是你千年之前的擦肩
      [00:37]想你的思绪时刻缠绕在心尖
      [00:44]我只为你牵动灵魂深处的腼腆
      [00:51]让真爱在云海中不断显现
      [00:58]我是你菩提树下的誓言
      [01:05]恋你的情愫时刻跌宕在心间
      [01:12]我只为你弹拨梦里梦外的缠绵
      [01:19]让真情在天地间百回千转
      [01:25]虽然我无法触摸你的脸
      [01:32]一颗爱你的心已化蝶千年
      [01:39]尽管你已经不记得前世情缘
      [01:46]我会陪伴你身边千年不变
      [02:20]我是你菩提树下的誓言
      [02:27]恋你的情愫时刻跌宕在心间
      [02:34]我只为你弹拨梦里梦外的缠绵
      [02:41]让真情在天地间百回千转
      [02:47]虽然我无法触摸你的脸
      [02:55]一颗爱你的心已化蝶千年
      [03:01]尽管你已经不记得前世情缘
      [03:08]我会陪伴你身边千年不变
      [03:15]虽然我无法依偎你的肩
      [03:22]一颗恋你的心已化蝶千年
      [03:29]尽管你已经不记得昔日之恋
      [03:36]我会守护你身边直到永远
      [03:43]我会守护你身边直到永远
      `;
      function $(id) {return document.getElementById(id);
      }//这样写以后getid方便
      function getLrcArray() {
          var parts = lrc.split("\n");
          for (let index = 0; index < parts.length; index++) {
              parts[index] = getLrcObj(parts[index]);
          }
          return parts;

          function getLrcObj(content) {
      var twoParts = content.split("]");
      var time = twoParts[0].substr(1);
      var timeParts = time.split(":");
      var seconds = +timeParts[1];
              var min = +timeParts[0];
              seconds = min * 60 + seconds;
              var words = twoParts[1];
              return{
                  seconds: seconds,
                  words: words,
              };
          }
      }
      var lrcArray = getLrcArray();
      function inputLrc() {
          for (let index = 0; index < lrcArray.length; index++) {
              var li = document.createElement("li");
              li.innerText = lrcArray[index].words;
              $("ullrc").appendChild(li);
          }
      }
      inputLrc();
      function setPosition() {
          var index = getLrcIndex();
          if (index == -1) {
              return;
          }
          var lrc_li_height = 80, lrc_ul_height = 60;
          var top = index * lrc_li_height + lrc_li_height / 2 - lrc_ul_height / 2;
      if (top < 0) {top = 0;}$("ullrc").style.marginTop = -top + "px";
          var activeLi = $("ullrc").querySelector(".active");
          if(activeLi){
              activeLi.classList.remove("active");}
      $("ullrc").children[index].classList.add("active");
      }
      var turn = 0;
      function getLrcIndex(){
      var time = $("aud").currentTime + turn;for (var index = 0; index < lrcArray.length; index++) {
              if (lrcArray[index].seconds > time) {
                  return index - 1;
              }
          }
      }
      $("aud").ontimeupdate = setPosition;
      plane.style.animationPlayState = aud.paused ? 'paused' : 'running';
      aud.addEventListener('playing', () => plane.style.animationPlayState = 'running');
      aud.addEventListener('pause', () => plane.style.animationPlayState = 'paused');

      plane0.style.animationPlayState = aud.paused ? 'paused' : 'running';
      aud.addEventListener('playing', () => plane0.style.animationPlayState = 'running');
      aud.addEventListener('pause', () => plane0.style.animationPlayState = 'paused');

      midground.style.animationPlayState = aud.paused ? 'paused' : 'running';
      aud.addEventListener('playing', () => midground.style.animationPlayState = 'running');
      aud.addEventListener('pause', () => midground.style.animationPlayState = 'paused');

      tx.style.animationPlayState = aud.paused ? 'paused' : 'running';
      aud.addEventListener('playing', () =>tx.style.animationPlayState = 'running');
      aud.addEventListener('pause', () =>tx.style.animationPlayState = 'paused');

      img_border.onclick = () => aud.paused ? aud.play() : aud.pause();
      aud.addEventListener('playing', () => img_border.style.animationPlayState = 'running');
      aud.addEventListener('pause', () => img_border.style.animationPlayState = 'paused');
      </script>

    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2025-11-15 14:24
  • 签到天数: 331 天

    [LV.8]以坛为家I

    64

    主题

    2546

    回帖

    8742

    积分

    论坛元老

    Rank: 80Rank: 80Rank: 80Rank: 80Rank: 80Rank: 80Rank: 80Rank: 80

    花潮美女鼠牛虎兔龙蛇马羊猴鸡狗猪多彩人生蝴蝶情怀心香一瓣金剪刀音画大师

    发表于 2022-12-19 16:09 | 显示全部楼层
    很漂亮的帖,感谢老师的代码分享!
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2025-12-1 20:32
  • 签到天数: 1052 天

    [LV.10]以坛为家III

    1883

    主题

    32万

    回帖

    37万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9

    花潮美女虎龙狗猪多彩人生星月交辉海样胸怀火热情怀优雅迷人神秘浪漫缤纷心情草莓情怀蝴蝶情怀心曲飞扬星星情怀七彩绚丽活泼开朗女儿情怀相遇之美一往情深花好月圆心香一瓣紫色情节飞龙在天金剪刀天籁妙音妙笔生花风雨同行我心永远天长地久幸福快乐绚丽缤纷喜乐安康中秋征文周年庆指尖上的流年舞会之星分析(喊冤)章总结章杀人王小强章最佳杀刺临屏写诗七夕诗钟活动第五届风云第六届风云情人节花潮管理

    发表于 2022-12-19 16:16 | 显示全部楼层
    歌词和播放器按钮变色很漂亮,人物变色有点吓人。欣赏亚伦老师好帖
     
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2019-11-25 21:11
  • 签到天数: 1 天

    [LV.1]初来乍到

    1423

    主题

    6万

    回帖

    12万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9

    花潮美女多彩人生星月交辉奔放热烈海样胸怀春风拂面火热情怀优雅迷人神秘浪漫缤纷心情草莓情怀青草情怀蝴蝶情怀心曲飞扬星星情怀七彩绚丽活泼开朗女儿情怀男儿情怀鹰傲苍穹心香一瓣音画大师天籁妙音风雨同行我心永远喜乐安康中秋征文指尖上的流年花潮管理

    发表于 2022-12-19 19:49 | 显示全部楼层
    这个界面移动的人物太大了
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    小黑屋|手机版|Archiver|服务支持:DZ动力|huachaowang.com Inc. ( 蜀ICP备17032287号-1 )

    GMT+8, 2025-12-19 07:48 , Processed in 0.073639 second(s), 26 queries .

    Powered by Discuz! X3.4

    © 2001-2013 Comsenz Inc.

    快速回复 返回顶部 返回列表