越剧——临终遗恨
<div class="t_fsz">
<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_1912908">
<style>
#papa {
margin: 80px 0 0 calc(50% - 593px);
width: 1024px;
height: 640px;
background: lightblue url('https://pic.imgdb.cn/item/6490fc9a1ddac507cc636ce2.gif') no-repeat center / cover;
box-shadow: 3px 3px 20px #000;
position: relative;
z-index: 1; overflow: hidden; display: grid; place-items: center;
--state: paused;
}
.mybox {
position: absolute;
left: 580px;
top: 40px;
width: 260px;
height: 260px;
background: rebeccapurple url('https://pic.imgdb.cn/item/648e55401ddac507ccffc4f1.jpg') no-repeat center / cover;
border-radius: 50%;
clip-path: polygon(
0 0, 100% 0, 100% 100%, 50% 100%, 50% 95%, 67% 67%, 95% 50%,
67% 33%, 50% 5%, 33% 33%, 5% 50%, 33% 67%, 50% 95%, 50% 100%, 0 100%
);
animation: move 12s infinite linear var(--state);
}
#pic {
position: absolute;
left: 594px;
top: 54px;
width: 226px;
height: 226px;
opacity: .85;
border-radius: 50%;
}
@keyframes move { to { transform: rotate(360deg); } }
@keyframes rot2 { from { transform: rotate(-15deg) scale(1); } to { transform: rotate(15deg) scale(1.5); } }
.tit { position: absolute; left: 50px; top:10px; display: grid;place-items: center; font: bold 2.8em '楷体',serif; color: SandyBrown; text-shadow: 1px 1px 2px tan;writing-mode: vertical-rl; }
.vid { position: absolute; width: 1024px; height: 695px; top: -55px;object-fit: cover; opacity: .98; clip-path: circle(78% at bottom) ;mix-blend-mode: screen;}
</style>
<div id="papa">
<video class="vid" src="//img.tukuppt.com/video_show/2269348/00/02/01/5b4ef06f1969e.mp4" autoplay="autoplay" loop="loop" muted="muted"></video>
<css-doodle grid="4x1" id="mplayer">
:doodle {
@size: 1024px 640px;
display: block;
opacity: .95;
position: absolute;
z-index: 1;
--geci: 'HUACHAO';
--motion: cover2;
--ww: 300px;
--prog: 0;
--tt: 1s;
--tt1: '00:00';
--tt2: '00:00';
--xplace: 69%;
--yplace: 94%;
--color: Gold;
--state: paused;
}
position: absolute;
@nth(1) { /* 歌词 */
@size: auto 3em;
@place: 49% 86%;
transform: translate(-50%);
display: grid;
place-items: center start;
:before, :after {
content: var(--geci);
width: fit-content;
height: fit-content;
font: bold 1.8em Sans-serif;
color: #ef083e;
text-shadow: 1px 1px 2px #080def;
white-space: pre;
}
:after {
position: absolute;
white-space: pre;
width: 0;
color: Gold;
overflow: hidden;
animation: var(--motion) var(--tt) linear forwards var(--state);
}
}
@nth(2) { /* 进度条 */
@size: var(--ww) 2px;
@place: var(--xplace) calc(var(--yplace) - 10px);
background: silver;
:before, :after { content: ''; }
:before {
position: absolute;
left: 0;
width: var(--prog);
height: 100%;
background: var(--color);
}
:after {
width: 100%;
height: 10px;
cursor: pointer;
}
}
@nth(3) { /* 按钮 */
@size: 60px;
@place: var(--xplace) calc(var(--yplace) - 52px);
cursor: pointer;
animation: rot 6s infinite linear var(--state);
:after {
content: '';
@size: inherit;
@shape: clover 4;
background-color: Navy;
background-image: radial-gradient(red, Yellow, green);
}
}
@nth(4) { /* 播放时间 */
@size: var(--ww) 20px;
@place: var(--xplace) calc(var(--yplace) - 30px);
:before, :after{
position: absolute;
width: 100%;
height: 100%;
color: var(--color);
}
:before { content: var(--tt1); }
:after { content: var(--tt2); text-align: right; }
}
@keyframes cover1 { from { width: 0; } to { width: 100%; } }
@keyframes cover2 { from { width: 0; } to { width: 100%; } }
@keyframes rot { to { transform: rotate(360deg); } }
</css-doodle>
</div>
<audio id="aud" src="https://www.joy127.com/url/105427.mp3" autoplay="autoplay" loop="loop"></audio>
<script>
(function(){
let script = document.createElement('script');
script.src = 'https://638183.freep.cn/638183/web/api/css-doodle.js';
document.head.appendChild(script);
let vid = document.querySelector('.vid');
let mKey = 0, mFlag = true, slip = 0.6;
let lrcAr = [
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
];
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 ? (mplayer.style.setProperty('--state', 'paused'),papa.style.setProperty('--state', 'paused'), vid.pause() ) : (mplayer.style.setProperty('--state','running'),papa.style.setProperty('--state', 'running'), vid.play());
let showLrc = (time) => {mplayer.style.setProperty('--motion', mFlag ? 'cover1' : 'cover2');mplayer.style.setProperty('--geci', '"' + lrcAr + '"');mplayer.style.setProperty('--tt', time + 's');mKey += 1;mFlag = !mFlag;};
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);};
aud.addEventListener('timeupdate', () => {for (j = 0; j < lrcAr.length; j++) {if (aud.currentTime - slip >= lrcAr) {cKey = j;if (mKey === j) showLrc(lrcAr);else continue;}}mplayer.style.setProperty('--prog', 100*aud.currentTime/aud.duration + '%');mplayer.style.setProperty('--tt1', `'${toMin(aud.currentTime)}'`);mplayer.style.setProperty('--tt2', `'${toMin(aud.duration)}'`);});
aud.addEventListener('play', mState, false);
aud.addEventListener('pause', mState, false);
aud.addEventListener('seeked', () => calcKey());
window.onload = () => {
let btns = mplayer.shadowRoot.querySelectorAll('cell');
let ww = parseInt(window.getComputedStyle(mplayer).getPropertyValue('--ww'));
btns.onclick = (e) => aud.currentTime = e.offsetX * aud.duration / ww;
btns.onclick = () => aud.paused ? aud.play() : aud.pause();
}
let outstr = '一失足成千古恨', num = 0;
Array.from({length: outstr.length}).forEach((item,key) => {
item = document.createElement('span');
item.className = 'tit';
item.innerText = outstr.slice(key,key+1);
item.style.cssText += `top: ${key * 70 + 50}px`;
papa.appendChild(item);
});
let tits = document.querySelectorAll('.tit');
(function chgFn() {
tits.style.animation = 'rot2 linear 1s backwards';
setTimeout( () => {
chgFn();
tits.style.animation = '';
}, 1200);
num += 1;
if(num > outstr.length - 1) num = 0;
})();
})();
</script></td></tr></table> 好听,这个唱段还挺长的,一直听完,上班偷偷听大戏,也是幸福呢{:4_173:}
欣赏有声有色老师好帖{:4_187:} 这个好,按暂停连视频也可以停止呢{:4_204:} 从不听越剧,因为听不懂。倒是京剧,也算半个票友。问好! 小文 发表于 2023-6-20 16:31
从不听越剧,因为听不懂。倒是京剧,也算半个票友。问好!
是吗。京剧我也喜欢。但是我主要喜欢程派,同好 红影 发表于 2023-6-20 16:15
这个好,按暂停连视频也可以停止呢
谢谢,就是学不会代码 有声有色 发表于 2023-6-20 16:56
是吗。京剧我也喜欢。但是我主要喜欢程派,同好
我最喜欢申凤梅,虽听不懂,就看字幕并硬听。京剧我喜欢的就多去了,所有名家的都喜欢。 京剧什么梅派、程派,我统统不喜欢。名气虽大,但男饰女的旦角不合我口味。我只喜欢看花脸类的,比如高庆奎的包公,谭老的老生也还对味口。男扮女我不喜欢,但女扮男,我喜欢。哈哈!如《女附马》 有声有色 发表于 2023-6-20 16:57
谢谢,就是学不会代码
这个不急的,慢慢的就会了啊{:4_204:} 问好老师,欣赏精彩佳作,谢谢分享,点赞!{:4_178:} 小文 发表于 2023-6-20 17:16
京剧什么梅派、程派,我统统不喜欢。名气虽大,但男饰女的旦角不合我口味。我只喜欢看花脸类的,比如高庆奎 ...
这也是一种爱好 红影 发表于 2023-6-20 20:19
这个不急的,慢慢的就会了啊
老了看来是学不会了。 梦缘 发表于 2023-6-20 22:40
问好老师,欣赏精彩佳作,谢谢分享,点赞!
谢谢鼓励 有声有色 发表于 2023-6-21 07:59
老了看来是学不会了。
那可不一定啊,制图不容易,你不也制得很好么{:4_173:}
页:
[1]