寒冬残荷 发表于 2022-12-15 22:42

网络新歌《赶羊调》


<style>
#papa {margin: 0 0 50px calc(50% - 627px); width: 1092px; height: 640px; background: gray url('https://pic.imgdb.cn/item/639b2415b1fccdcd36da94bf.jpg') no-repeat center/cover; box-shadow: 3px 6px 20px #000; display: grid; place-items: center; position: relative; z-index: 1; }
.mLine:nth-of-type(odd), .mLine:nth-of-type(even) {background: linear-gradient(to top, var(--color2),var(--color1),var(--color2)); border-radius:100%;}
/* 定义奇数位不同的颜色 */
/*.mLine:nth-of-type(odd) { --color1: hsl(30,90%,40%); }*/
</style>
<div id="papa"></div>
<audio id="aud" src="https://www.kumeiwp.com/sub/filestores/2022/12/15/d406469c25e99df450ec1b67700b6278.mp3" loop autoplay></audio>
<script>
(function() {
       (function(mkPlayer) {let defaults = {lrcAr: [],ypData: new Array(500).fill(0).map((v, k) => Math.floor(Math.random() * 200) + 10),pinpu: {size: 4, gap: 2,},player_css: '',lrc_css: '',playerCode: `<style>#mplayer{--ww:300px;--hh:140px; --color1:darkgreen; --color2:snow);position:absolute; bottom: 1px; width:var(--ww); height:var(--hh); display:flex; justify-content:center; align-items:flex-end; cursor:pointer;} .mLine{position:relative; margin:0 1px 0 1px; width:4px; height:8px; background:linear-gradient(to top,var(--color1),var(--color2)); transition:.35s; opacity: .95;} #lrc{--motion:cover2; --tt:2s; --state:paused; --bg:linear-gradient(180deg, hsla(60, 50%, 50%, .45), hsla(0, 100%, 50%, .75)); position:absolute; top:20px; font:bold 2.4em sans-serif; color:hsl(0, 10%, 90%); white-space:pre; -webkit-background-clip:text; filter:drop-shadow(1px 1px 2px hsla(0, 0%, 0%, .95));} #lrc::before{position:absolute; content:attr(data-lrc); width:20%; height:100%; color:transparent; overflow:hidden; white-space:pre; background:var(--bg); filter:inherit; -webkit-background-clip:text; animation:var(--motion) var(--tt) linear forwards;animation-play-state: var(--state);}@keyframes cover1 {from {width: 0;} to {width: 100%;}}@keyframes cover2 {from {width: 0;} to {width: 100%;}}</style><div id="mplayer"></div><div id="lrc" data-lrc="HCPlayer">HCPlayer</div>`,};
let playCode = (user_config) => {let data = Object.assign({}, defaults, user_config);papa.innerHTML += data.playerCode;mplayer.style.cssText += data.player_css;lrc.style.cssText += data.lrc_css;
mplayer.onclick = () => aud.paused ? aud.play() : aud.pause();aud.loop = false;
let ppsize = data.pinpu.size || 4, gap = data.pinpu.gap || 2;let total = Math.ceil(mplayer.offsetWidth / (ppsize + gap));let mKey = 0,ppnum = 0, mFlag = true;for (j = 0; j < total; j++) {let el = document.createElement('span');el.className = 'mLine';el.style.width = ppsize + 'px';el.style.marginLeft = el.style.marginRight = gap/2 + 'px';mplayer.appendChild(el);}let lines = document.querySelectorAll('.mLine');let max = Math.max.apply(null, data.ypData);let divide = max / mplayer.offsetHeight, coe = 20 / total / 2, plus;aud.addEventListener('pause', () => mState());aud.addEventListener('playing', () => { mState(); update(); });aud.addEventListener('ended', () => { mKey = 0; ppnum = 0; aud.play(); });aud.addEventListener('timeupdate', () => {ppnum++;if (ppnum >= data.ypData.length) ppnum = 0;update();for (j = 0; j < data.lrcAr.length; j++) {if (aud.currentTime >= data.lrcAr) {cKey = j;if (mKey === j) showLrc(data.lrcAr);else continue;}}});let update = () => lines.forEach((item, key) => {plus = (key < total / 2 ? key : total - key) * coe * 10;item.style.setProperty('height', Math.random() * (data.ypData - 30) / divide + plus + 'px');});let mState = () => aud.paused ? lrc.style.setProperty('--state', 'paused') : lrc.style.setProperty('--state', 'running');let showLrc = (time) => {let name = mFlag ? 'cover1' : 'cover2';lrc.innerHTML = data.lrcAr;lrc.dataset.lrc = data.lrcAr.replace(/<br>/, '\n');lrc.style.setProperty('--motion', name);lrc.style.setProperty('--tt', time + 's');lrc.style.setProperty('--state', 'running');mKey += 1;mFlag = !mFlag;};};mkPlayer.HCPlayer = playCode;})(this);
      
let lrcAr = [
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
       
];

      let ypData = ;

      HCPlayer({
                lrcAr: lrcAr,
                ypData: ypData,
                lrc_css: '',
lrc_css: '--bg:linear-gradient(180deg, hsla(120, 50%, 50%, .45), hsla(120, 100%, 50%, .75));font:bold 3.4em 华文隶书; ',
                       player_css: '--color1: hsl(114,100%,50%); --color2: hsla(120,0%,100%,0.15); --ww: 60%; align-items: center; bottom: 1px;',
                                    });
})();
</script>


辫子哥哥 发表于 2022-12-15 22:44

{:4_172:}
这个好

辫子哥哥 发表于 2022-12-15 22:46

这个羊应该旁边加个(阳){:4_189:}

马黑黑 发表于 2022-12-15 23:01

羊了好多个个羊{:4_170:}

红影 发表于 2022-12-16 11:34

这首歌太有意思,现在可不就是买好了药,等着阳来么{:4_173:}

红影 发表于 2022-12-16 11:37

一直听到最后,感谢寒冬残荷的美好祝福,跟你一起祝福大家安康{:4_187:}

梦缘 发表于 2022-12-16 15:54

真好看,欣赏老师的精彩!{:4_204:}

寒冬残荷 发表于 2022-12-16 20:47

辫子哥哥 发表于 2022-12-15 22:46
这个羊应该旁边加个(阳)

谢谢辫子版主!是呀,但作者小柯没有加(阳),我也不敢加呀。我开始只看歌名,还以为是民间小调呢,听了才知道是《赶(阳)调》,网上说是作者12月12日作曲作词和发表的。

寒冬残荷 发表于 2022-12-16 20:48

马黑黑 发表于 2022-12-15 23:01
羊了好多个个羊

谢谢马老师的鼓励和支持!

马黑黑 发表于 2022-12-16 20:51

寒冬残荷 发表于 2022-12-16 20:48
谢谢马老师的鼓励和支持!

{:4_191:}

寒冬残荷 发表于 2022-12-16 20:54

红影 发表于 2022-12-16 11:34
这首歌太有意思,现在可不就是买好了药,等着阳来么

谢谢红管理的鼓励和支持!我在乡下没有及时出去买药,前两天才出去,可药店都没有防“羊”的药了呢。所以,我希望“我的羊可不可以别来?你看我那么可爱,无论怎样你也是个灾,最好你能走开!”{:5_117:}

寒冬残荷 发表于 2022-12-16 20:56

梦缘 发表于 2022-12-16 15:54
真好看,欣赏老师的精彩!

谢谢梦缘老师的鼓励和支持!{:4_204:}

辫子哥哥 发表于 2022-12-16 21:05

寒冬残荷 发表于 2022-12-16 20:47
谢谢辫子版主!是呀,但作者小柯没有加(阳),我也不敢加呀。我开始只看歌名,还以为是民间小调呢,听了 ...

没事,不客气

红影 发表于 2022-12-16 23:00

寒冬残荷 发表于 2022-12-16 20:54
谢谢红管理的鼓励和支持!我在乡下没有及时出去买药,前两天才出去,可药店都没有防“羊”的药了呢。所以 ...

是啊,现在药店里相关的药都被抢空了。只能自己注意点,想办法别羊了才好{:4_187:}
页: [1]
查看完整版本: 网络新歌《赶羊调》