【五九消寒】第五天 咽
<style>#papa {
width: 640px;
min-height: 1200px;
padding: 40px;
box-sizing: border-box;
border-radius: 12px;
box-shadow: 0 0 8px #000;
position: relative;
margin: 20px auto;
top: 50px;
display: grid; user-select: none;
place-items: center;
user-select: none;
}
#tit {
position: absolute;
left: 175px;
top: 400px;
font: bold 22px/26px 'FangSong',serif;
color: SlateBlue;
}
#papa::before, #papa::after {
position: absolute;
content: '';
}
#papa::before {
left: 10px;
top: 10px;
right: 10px;
bottom: 10px;
border: 2px dashed DarkBlue;
border-radius: inherit;
}
#papa::after {
content: '【五九消寒】每五天 咽';
padding: 10px 40px 10px 10px;
left: -10px;
top: 20px;
border-radius: 10px 0 0 10px;
background: MediumBlue;
opacity: .85;
font: bold 16px/24px sans-serif;
color: white;
clip-path: polygon(0 0,100% 0,90% 50%, 100% 100%, 0 100%);
}
#pic {
position: absolute;
left: 50px;
top: 90px;
width: 500px;
height: 281px;
}
.mpic { position: absolute; right: -10px; bottom: -10px; width: 300px; height: 183px; }
.mpic1 { position: absolute; width: 100%; height: 100%; left: 0px; top: 0px; opacity: .35;
background: url('https://pic.imgdb.cn/item/647c033ef024cca17313a454.gif'); }
@keyframes swing { from { transform: rotate(3deg); } to { transform: rotate(-2deg); } }
</style>
<div id="papa">
<div class="mpic1"></div>
<img id="pic" src= "https://pic.imgdb.cn/item/6599fc28871b83018ac45c46.jpg""" alt="" />
<img src="https://pic.imgdb.cn/item/6482db5b1ddac507ccaa9ddd.gif" alt="" class="mpic" />
<div id="tit">五九用联:枯树染残咽哀叙荒茫 <br>
第五天 咽<br><br>
将军您<br>
座镇三段险要关隘<br>
日夜操劳,事必恭亲<br>
诸如,押运粮草辎重<br>
调动兵源和不断地鼓舞士气<br>
甚至,你的一呼一吸<br>
都关乎胜负的消长<br><br>
您的业绩关乎帝国的兴衰<br>
人民巴不得你万寿无疆<br>
生怕你偶感风寒或其它小恙<br>
否则,忐忑的不仅是前方<br><br>
将军您可不能感情用事<br>
胜败乃兵家之常<br>
用不着悲切<br>
让我们上下高歌齐唱<br>
歌声穿越雄关,慷慨铿锵<br><br>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=1362020289.mp3" loop autoplay></audio>
<script >
(function() {
(function(mkPlayer) {let defaults = {lrcAr: [],lrc_css: 'top: 10px; left: 50%; transform: translateX(-50%);',player_css: 'bottom: 20px; left: 50%; transform: translateX(-50%);',playerCode: `<style>#mplayer {position: absolute;display: grid;grid-template-areas: 'cur btnplay dur''prog prog prog';gap: 8px 2px;place-items: end center;color: var(--color);font: normal 16px sans-serif;z-index: 999;--ww: 280px;--color: MidnightBlue;--track: hsla(90,100%,95%,.65);--prog: linear-gradient(90deg,hsla(90,30%,50%,.55),hsla(0,100%,50%,.75),hsla(180,100%,50%,.65));}#cur { grid-area: cur; color: var(--color); }#dur { grid-area: dur; color: var(--color); }#btnplay {--dis1: block;--dis2: none;grid-area: btnplay;width: 35px;height: 35px;border: 3px solid var(--color);border-radius: 50%;opacity: .95;cursor: pointer;transition: .3s;position: relative;}#btnplay:hover { opacity: 1; box-shadow: 0 0 5px var(--color), inset 0 0 5px var(--color); }#btnplay::before, #btnplay::after {position: absolute;content: '';width: 100%;height: 100%;background: var(--color);}#btnplay::before { display: var(--dis1); clip-path: polygon(35% 30%, 75% 50%, 35% 70%); }#btnplay::after {display: var(--dis2);clip-path: polygon(35% 30%, 45% 30%, 45% 70%, 35% 70%, 55% 70%, 65% 70%, 65% 30%, 55% 30%, 55% 70%, 35% 70%);}#prog {--xx: 0px;grid-area: prog;width: var(--ww);height: 4px;background: var(--track);position: relative;display: grid;place-items: center;}#prog::before, #prog::after { position: absolute; content: ''; }#prog::before {left: 0;width: var(--xx);height: 100%;border-radius: 6px;background: var(--prog);}#prog::after {left: calc(var(--xx) - 12px);opacity: .85;width: 16px;height: 16px;background: radial-gradient(transparent 2px, teal 0, black);border-radius: 50%;cursor: pointer;}#lrc {--motion: cover2;--tt: 2s;--state: paused;--bg: linear-gradient(180deg, hsla(90, 50%, 50%, .45), hsla(0, 100%, 50%, .75));position: absolute;font: bold 1.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));z-index: 1000;}#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="lrc" data-lrc=" "> </div><div id="mplayer"><span id="btnplay"></span><span id="prog"></span><span id="cur">00:00</span><span id="dur">00:00</span></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;let mKey = 0, mFlag = true, mDrag = false;btnplay.onclick = () => aud.paused ? aud.play() : aud.pause();aud.addEventListener('timeupdate', () => {cur.innerText = toMin(aud.currentTime);dur.innerText = toMin(aud.duration);if(mDrag===false) prog.style.setProperty('--xx', aud.currentTime * prog.offsetWidth / aud.duration + 'px');for (j = 0; j < data.lrcAr.length; j++) {if (aud.currentTime >= data.lrcAr) {cKey = j;if (mKey === j) showLrc(data.lrcAr);else continue;}}});aud.addEventListener('pause', () => mState());aud.addEventListener('play', () => mState());aud.addEventListener('seeked', () => calcKey());prog.onmousedown = (e) => mDrag = true;prog.onmousemove = (e) => { if(mDrag) prog.style.setProperty('--xx',e.offsetX + 'px'); };prog.onmouseup = (e) => {aud.currentTime = aud.duration * e.offsetX / prog.offsetWidth;mDrag = false;};let mState = () => aud.paused ? (lrc.style.setProperty('--state','paused'),btnplay.style.setProperty('--dis1','block'), btnplay.style.setProperty('--dis2','none')): (lrc.style.setProperty('--state','running'),btnplay.style.setProperty('--dis1','none'), btnplay.style.setProperty('--dis2','block'));let showLrc = (time) => {let name = mFlag ? 'cover1' : 'cover2';lrc.innerHTML = lrcAr;lrc.dataset.lrc = lrcAr.replace(/<br>/, '\n');lrc.style.setProperty('--motion', name);lrc.style.setProperty('--tt', time + 's');lrc.style.setProperty('--state', 'running');mKey += 1;mFlag = !mFlag;};let calcKey = () => {for (j = 0; j < data.lrcAr.length; j++) {if (aud.currentTime <= data.lrcAr) {mKey = j - 1;break;}}if (mKey < 0) mKey = 0;if (mKey > data.lrcAr.length - 1) mKey = data.lrcAr.length - 1;let time = data.lrcAr - (aud.currentTime - data.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;}};mkPlayer.HCPlayer = playCode;})(this);
let lrcAr = [
,
];
HCPlayer({
lrcAr: lrcAr,
lrc_css: 'left: calc(50% - 70px); bottom: 55px; --bg: linear-gradient(hsla(100, 100%, 70%, .35),hsla(120, 100%, 50%, .55));',
player_css: 'left: 170px; bottom: 90px;--track: hsla(0,0%,80%,.95); --prog: linear-gradient(90deg,hsla(120,100%,50%,.55),hsla(0,100%,50%,.55),hsla(120,100%,50%,.65));',
});
})();
</script>
师兄少复制了一句,帮你加上去了{:4_173:} 这悲悲切切的琴音,真的像女子的絮絮诉说呢。感觉师兄写的是霸王别姬么,用虞姬的口吻写的吧{:4_187:} 古琴曲卧龙叭意境悠远、平和,听起来真舒服。 红影 发表于 2024-1-31 11:01
师兄少复制了一句,帮你加上去了
谢谢师妹,我那音乐名字字体乍那么大呢{:4_203:} 红影 发表于 2024-1-31 11:05
这悲悲切切的琴音,真的像女子的絮絮诉说呢。感觉师兄写的是霸王别姬么,用虞姬的口吻写的吧
有点复杂{:4_189:}总之是歌颂咽喉吧。因为咽部有上中下三段,想到了关隘呢,就顺着凑了{:4_189:} 樵歌 发表于 2024-1-31 11:12
谢谢师妹,我那音乐名字字体乍那么大呢
帮师兄改得小点了,师兄看看可以么{:4_204:} 樵歌 发表于 2024-1-31 11:13
有点复杂总之是歌颂咽喉吧。因为咽部有上中下三段,想到了关隘呢,就顺着凑了
原来是这样,这构思真逗奇妙的呢{:4_187:} 梦油 发表于 2024-1-31 11:11
古琴曲卧龙叭意境悠远、平和,听起来真舒服。
找曲儿真是难为我了,平时不大听过的,为了迎合文字,只好一首首试听下效果,再决定取舍。{:4_190:} 红影 发表于 2024-1-31 11:24
帮师兄改得小点了,师兄看看可以么
好的,还没看,这就去,看成看成那段代码是怎么弄的{:4_187:} 红影 发表于 2024-1-31 11:25
原来是这样,这构思真逗奇妙的呢
这个路子宽,好凑呢{:4_189:}如果有几种思路,肯定找最好凑的 红影 发表于 2024-1-31 11:24
帮师兄改得小点了,师兄看看可以么
把师妹改过的,已经在存文档里也改过来了。{:4_190:} 樵歌 发表于 2024-1-31 14:12
好的,还没看,这就去,看成看成那段代码是怎么弄的
这个大小的修改在那一堆的里面,师兄估计找起来困难。
师兄只要注意一下代码的倒数第三行那里的这个;lrc_css: 'left: calc(50% - 70px); bottom: 55px;
当歌名文字较多时,就把这个70改大点,就会往左移动了,否则太多字数的歌名会不居中。如果想往右,就取小
后面那个55可以调上下,取大点就往上跑,取得小就往下跑
樵歌 发表于 2024-1-31 14:13
这个路子宽,好凑呢如果有几种思路,肯定找最好凑的
师兄已经写得顺手了,所以感觉路子宽{:4_173:} 樵歌 发表于 2024-1-31 14:18
把师妹改过的,已经在存文档里也改过来了。
嗯嗯,师兄这里就可以试试,倒数第三行的那两个数字,师兄也可以改的。 樵歌 发表于 2024-1-31 14:10
找曲儿真是难为我了,平时不大听过的,为了迎合文字,只好一首首试听下效果,再决定取舍。
嗬!那可费劲啦! 今天感觉悲壮大气的。 红影 发表于 2024-1-31 14:47
这个大小的修改在那一堆的里面,师兄估计找起来困难。
师兄只要注意一下代码的倒数第三行那里的这个;lr ...
好的,就去试试,今天的,觉得好大的字,而且与分隔线靠一起了, 庶民 发表于 2024-1-31 16:45
今天感觉悲壮大气的。
反正照猫画虎,乱凑呗 红影 发表于 2024-1-31 14:49
师兄已经写得顺手了,所以感觉路子宽
有些字看起好写,当要写时又犯难了。我想后面,我们是不是可以把这个组成词。比如第六天 哀
组成悲哀,再来写,就有目标好写了?
页:
[1]
2