【心情日记】风雨日记
<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 8px;
content: '《风雨日记》';
left: 273px;
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>7月10日 星期四 暴雨<br><br>
窗外的世界正在上演一场大自然的交响乐。狂风裹挟着雨点,重重地拍打在玻璃上,发出噼啪的声响。树枝在风中疯狂摇摆,像是在跳一支狂野的舞蹈。<br><br>
我坐在窗边,捧着一杯热茶,看着外面的景象出神。雨水顺着窗玻璃蜿蜒而下,模糊了视线。街上行人匆匆,撑着摇摇欲坠的雨伞,像是一幅流动的水墨画。<br><br>
这样的天气总让我想起小时候。那时每逢暴雨,妈妈就会煮一锅姜汤,爸爸则会检查门窗是否关好。我们全家人挤在客厅里,听着雨声讲故事。如今虽然独自生活,但暴雨天带来的那种温暖又安全的感觉依然存在。<br><br>
风似乎更大了,雨点变成了斜线。我突然想到,人生不也像这样的天气吗?有风和日丽,也有狂风暴雨。但正是这些不同的天气,才让生活丰富多彩。<br><br>
雨渐渐小了,天空透出一丝光亮。我放下茶杯,伸了个懒腰。这场暴雨冲刷了城市的尘埃,也洗涤了我的心灵。
</p>
<p><p class="txtRight">偶然<br>2025年07月10日</p>
</div>
<audio id="aud" src="https://ouran2023.s3-us-east-1.ossfiles.com/jita.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> 雨里有这么多美好的念想和回忆,这样场雨真好,让偶然君得到这么多美好的感受{:4_187:} 欣赏偶然君好帖{:4_199:} 触景生情,从而引发内心真情的流露,非常感人!{:4_178:}
页:
[1]