玫瑰 发表于 2026-7-25 08:14

冰上赤足


冰上赤足
文/玫瑰

冰上赤足
这个夏季里遐想
这题目有创意
真的来好很及时

如果真要冰上赤足
我想在这夏季
有一丝丝狼人
不是是有一丝丝凉意

我想去滑一场冰
冰上赤足
会是透心凉
凉到心的时候
可以避开夏日的炎热

一只脚穿上袜子
一只脚不穿上袜子
冰上赤足
即可脚上舒服
心也可以凉快
两全其美


一只脚穿上袜子
一只脚不穿上袜子
冰上赤足
滑一场冰
前滑、后滑、前八字滑、后八字滑
再来个滑坡
这个夏季真的浪漫
浪漫到飞起来

2026.7.24

玫瑰 发表于 2026-7-25 08:15

https://pic.rmb.bdstatic.com/bjh/down/58ea81375b5442f4401af2b8943ebb57.gif

玫瑰 发表于 2026-7-25 08:17


<style>
#papa {margin: 100px -150px;width: 1286px;height: 720px;background: url('https://pic.imgdb.cn/item/65b76cfb871b83018ab9b60e.png') no-repeat 90% 50%/100px 200px,url('https://pic.imgdb.cn/item/65b76f2c871b83018ac00c9e.png') no-repeat 80% 35%/220px 300px, url('https://img.wyc520.com.cn/data/attachment/forum/202606/22/153228r1uh11ryg8ntyo53.jpg') no-repeat center/cover; z-index: 1;display: grid; overflow: hidden;position: relative;}
#aud {position:absolute;bottom: -10px; margin-left:0px;z-index: 60;
    display: block;
    width:102%;clip-path: inset(20% 1% 20% 1%);filter:invert(100%);margin: 0px -14px;
}

#lrc {
      --state: paused;
      --motion: cover2;
      --tt: 2s;
      --bg: linear-gradient(0deg, #ff0000, #ff0000, #ff0000);
      position: absolute;z-index: 6;
      left: 52%;
      transform: translate(-50%);
      top: 480px;
      font:normal 3em 华文新魏;
      font-weight:400;
      color: #eeeeee;
      white-space: pre;
      -webkit-background-clip: text;
      filter:drop-shadow(#000 1px 0 0)drop-shadow(#000 0 1px 0)drop-shadow(#000 -1px 0 0) drop-shadow(#000 0 -1px0);
}
#lrc::before {
      position: absolute;
      content: attr(data-lrc);
      width: 20%;
      height: 100%;
      color: transparent;
      overflow: hidden;
      white-space: pre;
      background: var(--bg);
      
      -webkit-background-clip: text;
      animation: var(--motion) var(--tt) linear forwards;
      animation-play-state: var(--state);
}
@keyframes cover1{0% { width: 0%;}100% { width: 100%;}}
@keyframes cover2 { 0% { width: 0%;}100% { width: 100%;}}

#canvas{position: absolute;width: 55%;z-index: 4;top:340px; left:250px; }
</style>
<div id="papa">
<audio   id="aud"src="https://s2.ananas.chaoxing.com/sv-w8/audio/e6/20/2a/da37d85940ed4d18cd8a6ad814754d2e/audio.mp3" autoplay loopcontrols crossOrigin="anonymous"></audio>
<div data-lrc="倾听音乐" id="lrc" title="歌词显示">倾听音乐</div>
<canvas id="canvas" "></canvas>
</div>
<script >
(function() {
/*原始lrc歌词*/
let lrcStr = `小薇 - 黄品源
词:阿弟
曲:阿弟
有一个美丽的小女孩
她的名字叫作小薇
她有双温柔的眼睛
她悄悄偷走我的心
小薇啊
你可知道我多爱你
我要带你飞到天上去
看那星星多美丽
摘下一颗亲手送给你
有一个美丽的小女孩
她的名字叫作小薇
她有双温柔的眼睛
她悄悄偷走我的心
小薇啊
你可知道我多爱你
我要带你飞到天上去
看那星星多美丽
摘下一颗亲手送给你
小薇啊
你可知道我多爱你
我要带你飞到天上去
看那星星多美丽
摘下一颗亲手送给你
`;

/*变量 :mKey - 当前歌词索引;mFlag :调用关键帧动画索引;averAdd :平均值补偿*/
let mKey = 0, mFlag = true, averAdd = 0.3;

/*函数 :获取每句歌词用时,歌词用时若超过平均值则取平均值,最后一句歌词则取平均值*/
let lrcTime = (ar) => {
      let tmpAr = [];
      for(j = 0; j <ar.length - 1; j ++) {
                if(j !== ar.length - 1) tmpAr = parseFloat((ar - ar).toFixed(1));
      }
      let aver = parseInt(tmpAr.reduce((a,b) => a + b) / (tmpAr.length - 1)) + averAdd;
      tmpAr.push(aver);
      tmpAr.forEach((item,key) => {
                ar = item > aver ? aver : item;
      });
      return ar;
};

/*函数 :从原始lrc歌词获取信息并存入 n*3 数组*/
let getLrcAr = (text) => {
      let lrcAr = [];
      let calcRule = ;
      for(x of text.split('\n')) {
                let ar = [];
                let re = /\d+[\.:]\d+([\.:]\d+)?/g;
                let geci = x.replace(re,'');
                if(geci) {
                        geci = geci.replace(/[\[\]\'\"\t,]s?/g,'');
                        let time = x.match(re);
                        if(time != null) {
                              for(y of time) {
                                        let tmp = y.match(/\d+/g);
                                        let sec = 0;
                                        for(z in tmp) sec += tmp * calcRule;
                                        ar = ;
                                        lrcAr.push(ar);
                              }
                        }
                }
      }
      lrcAr.sort((a,b)=> a - b);
      return(lrcTime(lrcAr));
};

/*函数 :模拟显示同步歌词*/
let showLrc = (time) => {
      let name = mFlag ? 'cover1' : 'cover2';
      lrc.innerHTML = lrcAr;
      lrc.dataset.lrc = lrcAr;
      lrc.style.setProperty('--motion', name);
      lrc.style.setProperty('--tt', time + 's');
      lrc.style.setProperty('--state', 'running');
      mKey += 1;
      mFlag = !mFlag;
};

/*函数 :处理当前歌词索引 mKey*/
let calcKey = () => {
      for (j = 0; j < lrcAr.length; j++) {
                if (aud.currentTime <= lrcAr) {
                        mKey = j - 1;
                        break;
                }
      }
      if (mKey < 0) mKey = 0;
      if (mKey > lrcAr.length - 1) mKey = lrcAr.length - 1;
      let time = lrcAr - (aud.currentTime - lrcAr);
      showLrc(time);
};

/*格式化时间信息*/
let toMin = (val) => {
      if (!val) return '00:00';
      val = Math.floor(val);
      let min = parseInt(val / 60),
      sec = parseFloat(val % 60);
      if (min < 10) min = '0' + min;
      if (sec < 10) sec = '0' + sec;
      return min + ':' + sec;
}

/*函数 :关键帧动画状态切换*/
let mState = () => aud.paused ? (lrc.style.setProperty('--state','paused'),mplayer.style.animationPlayState = 'paused') : (lrc.style.setProperty('--state','running'),mplayer.style.animationPlayState = 'running');

/*监听播放进度*/
aud.addEventListener('timeupdate', () => {
      for (j = 0; j < lrcAr.length; j++) {
                if (aud.currentTime >= lrcAr) {
                        cKey = j;
                        if (mKey === j) showLrc(lrcAr);
                        else continue;
                }
      }
});
aud.addEventListener('pause', () => mState());/*监听暂停事件*/
aud.addEventListener('play', () => mState());/*监听播放事件*/
aud.addEventListener('seeked', () => calcKey());/*监听查询事件*/
let lrcAr = getLrcAr(lrcStr); /*获得歌词数组*/
})();
</script>
<script>
window.onload = function () {
      var oAudio = document.getElementById('aud');
   
      // 创建音频上下文对象
      var oCtx = new AudioContext();
      // console.log(oCtx);
      // 创建媒体源,除了audio本身可以获取,也可以通过oCtx对象提供的api进行媒体源操作
      var audioSrc = oCtx.createMediaElementSource(oAudio);
      // 创建分析机
      var analyser = oCtx.createAnalyser();
      // 媒体源与分析机连接
      audioSrc.connect(analyser);
      // 输出的目标:将分析机分析出来的处理结果与目标点(耳机/扬声器)连接
      analyser.connect(oCtx.destination);

      // 利用cancas渐变进行音频绘制
      var ctx = canvas.getContext('2d');
      canvas.width = window.innerWidth;
      canvas.height = window.innerHeight;
      var oW = canvas.width;
      var oH = canvas.height;
      var color1 = ctx.createLinearGradient(oW / 2, oH / 2 - 30, oW / 2, oH / 2 - 100);
      var color2 = ctx.createLinearGradient(oW / 2, oH / 2 + 30, oW / 2, oH / 2 + 100);
      color1.addColorStop(0, '#ffffff');
      color1.addColorStop(.5, '#fff000');
      color1.addColorStop(1, '#00ff00');
      color2.addColorStop(0, '#ffffff');
      color2.addColorStop(.5, '#fff000');
      color2.addColorStop(1, '#00ff00');
      // 音频图的条数
      var count = 200;
      // 缓冲区:进行数据的缓冲处理,转换成二进制数据
      var voiceHeight = new Uint8Array(analyser.frequencyBinCount);
      // console.log(voiceHeight);

      function draw() {
      // 将当前的频率数据复制到传入的无符号字节数组中,做到实时连接
      analyser.getByteFrequencyData(voiceHeight);
      // console.log(voiceHeight);
      // 自定义获取数组里边数据的频步
      var step = Math.round(voiceHeight.length / count);
      ctx.clearRect(0, 0, oW, oH);
      for (var i = 0; i < count; i++) {
          var audioHeight = voiceHeight;
          ctx.fillStyle = color1;// 绘制向上的线条
          ctx.fillRect(oW / 2 + (i * 5), oH / 2, 2, -audioHeight);
          ctx.fillRect(oW / 2 - (i * 5), oH / 2, 2, -audioHeight);
          ctx.fillStyle = color2;// 绘制向下的线条
          ctx.fillRect(oW / 2 + (i * 5), oH / 2, 2, audioHeight);
          ctx.fillRect(oW / 2 - (i * 5), oH / 2, 2, audioHeight);
      }
      window.requestAnimationFrame(draw);
      }
      draw();

    }
</script>

红影 发表于 2026-7-25 16:53

这样炎热的夏季,来一场冰上之旅真的很舒服也很浪漫,这想法真不错,我也想去{:4_173:}

梦风雨 发表于 2026-7-25 20:32

本帖最后由 梦风雨 于 2026-7-25 20:33 编辑

红影 发表于 2026-7-25 16:53
这样炎热的夏季,来一场冰上之旅真的很舒服也很浪漫,这想法真不错,我也想去
我也想去,想到一起了。{:4_178:}

红影 发表于 2026-7-25 22:52

梦风雨 发表于 2026-7-25 20:32
我也想去,想到一起了。

那大家相约一起去玩{:4_173:}

玫瑰 发表于 2026-7-26 21:09

红影 发表于 2026-7-25 22:52
那大家相约一起去玩

周日快乐,聆听分享。

红影 发表于 2026-7-27 21:02

玫瑰 发表于 2026-7-26 21:09
周日快乐,聆听分享。

问好玫瑰,分享快乐{:4_187:}
页: [1]
查看完整版本: 冰上赤足