忆江南 • 秋思
本帖最后由 偶然~ 于 2023-10-17 19:02 编辑 <br /><br /><style>#mydiv {
margin: 30px auto;
padding: 20px 10px;
width: 90%;
min-height: 400px;
border: 1px solid var(--fColor);
color: var(--fColor);
background: var(--bgMain);
position: relative;
pointer-events: none;
--bgMain: linear-gradient(snow,lightgreen,snow);
--bgTitle: lightgreen;
--fColor: black;
--btnWidth: 40px;
--state: paused;
}
#mydiv::before, #mydiv::after { position: absolute; content: ''; }
#mydiv::before {
padding: 0 20px;
content: '忆江南 · 秋思';
left: 250px;
top: -18px;
font: bold 24px / 36px sans-serif;
text-shadow: 1px 1px 2px #111;
border: inherit;
background: var(--bgTitle);
}
#mydiv::after {
width: var(--btnWidth);
height: var(--btnWidth);
background: conic-gradient(var(--fColor),var(--bgTitle),var(--fColor),var(--bgTitle));
border-radius: 50%;
bottom: calc(var(--btnWidth) / -2);
left: calc(50% - var(--btnWidth) / 2);
cursor: pointer;
pointer-events: auto;
animation: rot 5s infinite linear var(--state);
}
#mydiv p { padding: 20px 0; font-size: 16px ; }
.txtRight { position: absolute; text-align: center; right: 10px; bottom: -10px; }
.txtMid { text-align: center; }
@keyframes rot { to { transform: rotate(360deg); } }
</style>
<div id="mydiv">
<p><p><p>秋萧瑟,冬雨暗风寒。残柳疏桐阡陌路,青松霜柏碧连天。霜露染山川。</p>
<p>南塞雁,故地在眸前。尘世无常多变幻,梓桑辞别十余年。乡土记心间。</p>
<p class="txtRight">偶然<br>2023年10月17日</p>
</div>
<audio id="aud" src="https://ouran2023.s3-us-east-1.ossfiles.com/lalala.mp3" autoplay="autoplay" loop="loop"></audio>
<script>
(function () {
let mState = () => mydiv.style.setProperty('--state', aud.paused ? 'paused' : 'running');
aud.addEventListener('play', mState, false);
aud.addEventListener('pause', mState, false);
mydiv.onclick = () => aud.paused ? aud.play() : aud.pause();
})();
</script> 大家可以听到音乐吗? 偶然~ 发表于 2023-10-17 17:41
大家可以听到音乐吗?
能听到,很好听的一首哼唱音乐{:4_187:} 这个好,词填得漂亮,制作也很美。欣赏偶然君好帖{:4_199:} 佳作,赞! 真好,欣赏!
页:
[1]