【画笔似有马良功】荷塘月色
<style>#papa {
margin: 0 0 0 calc(50% - 733px);
width: 1300px;
height: 780px;
background: teal url('http://bohann.net/data/attachment/forum/202308/13/184525wh3s8o0013gz8666.jpg ') no-repeat center/cover;
box-shadow: 8px 6px 18px rgba(0,0,0,.35);
border-radius: 8px;
position: relative;
z-index: 1;
}
#mplayer {
--state: paused;
--angle: 360deg;
width: 220px;
height: 220px;
top: 450px;
left: 40px;
background: url('http://bohann.net/data/attachment/forum/202308/13/184500hoiin7c2c5ooy91o.jpg') no-repeat center/cover;
border-radius: 50%;
display: grid;
place-items: center;
cursor: pointer;
position: absolute;
}
#circle {
position: absolute;
top: -8px; left: -8px; bottom:-8px; right: -8px;
border: 6px dotted #eee;
border-radius: 50%;
display: grid;
place-items: center;
animation: rot infinite 8s linear;
animation-play-state: var(--state);
}
#circle::before, #circle::after {
position: absolute;
content: '';
top: -12px; left: -12px; bottom:-12px; right: -12px;
border: 6px dotted #00FFFF;
border-radius: 50%;
animation: rot infinite 3s linear;
animation-play-state: var(--state);
--angle: -360deg;
}
#circle::after {
top: -20px; left: -20px; bottom:-20px; right: -20px;
border-color: #A52A2A;
animation-duration: 12s;
--angle: 360deg;
}
@keyframes rot {
from { transform: rotate(0); }
to { transform: rotate(var(--angle)); }
}
</style>
<div id="papa">
<div id="mplayer">
<span id="circle"></span>
</div>
</div>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=1989844323.mp3" autoplay loop></audio>
<script>
(function(mkFS) {let setFullScreen = (user_set) => {let pa = user_set.pa;if(typeof(pa) !== 'object') return false;if(!user_set.set) user_set.set = 'color: snow; background: black; border: 2px solid snow; left: 40px; bottom: 40px;';btnMsg = document.createElement('span');btnMsg.style.cssText = `position: absolute; border-radius: 8px; padding: 4px; cursor: pointer; z-index:998; ${user_set.set}`;btnMsg.innerText = '全屏观赏';btnMsg.style.display = 'none';pa.appendChild(btnMsg);let timerId, fs = false;btnMsg.onclick = () => fs ? document.exitFullscreen() : pa.requestFullscreen();pa.addEventListener('mousemove', (e) => {clearTimeout(timerId);btnMsg.style.display = 'block';timerId = setTimeout('btnMsg.style.display = "none"', 3000);});document.addEventListener('fullscreenchange', () => {if (document.fullscreenElement !== null) {fs = true;btnMsg.innerText = '退出全屏';} else {fs = false;btnMsg.innerText = '全屏观赏';}});};mkFS.FS = setFullScreen;})(this);
let mState = () => mplayer.style.setProperty('--state', aud.paused ? 'paused' : 'running');
aud.addEventListener('play', () => mState());
aud.addEventListener('pause', () => mState());
mplayer.addEventListener('click', () => aud.paused ? aud.play() : aud.pause());
FS({
pa: papa,
set: 'color: snow; background: transparent; border: 2px solid snow; top: 180px;left:60px',
});
</script> 声音是比较大的啊 色彩艳丽{:10_402:}
页:
[1]