梅花引(兼祝2024新年快乐)
<style>#papa {
margin: 0 0 0 calc(50% - 721px);
position: relative;
display: grid;
place-items: center;
width: 1280px;
height: 846px;
box-shadow: 3px 3px 20px #000;
z-index: 1;
overflow: hidden;
}
.bgpic {
position: absolute;
width: 640px;
height:423px;
left: 0;
top: 0;
content: url('https://638183.freep.cn/638183/t23/3/mwhxyb.jpg');
}
.bgpic:nth-of-type(2) {
top: 423px;
transform: rotateX(180deg);
}
.bgpic:nth-of-type(3) {
left: 640px;
transform: rotateY(180deg);
}
.bgpic:nth-of-type(4) {
left: 640px;
top: 423px;
transform: rotateX(180deg) rotateY(180deg);
}
#btnplay {
cursor: pointer;
z-index: 1;
animation: rotating 5s infinite linear var(--state);
}
#vid {
position: absolute;
right: -162px;
width: 1442px;
height: 846px;
mix-blend-mode: screen;
object-fit: cover;
pointer-events: none;
}
@keyframes rotating {
to { transform: rotate(1turn); }
}
</style>
<div id="papa">
<div class="bgpic"></div>
<div class="bgpic"></div>
<div class="bgpic"></div>
<div class="bgpic"></div>
<video id="vid" src="https://img.tukuppt.com/video_show/7165162/00/19/45/5f0825112d55a.mp4" autoplay loop muted></video>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=1478140139" autoplay loop></audio>
<img id="btnplay" src="https://638183.freep.cn/638183/t23/btn/meihua_133482968750383750.png" alt="" title="播放/暂停" />
</div>
<script>
(function() {
let mState = () => {
aud.paused ?
(papa.style.setProperty('--state','paused'), vid.pause()) :
(papa.style.setProperty('--state','running'), vid.play());
};
aud.addEventListener('playing', mState, false);
aud.addEventListener('pause', mState, false);
btnplay.onclick = () => aud.paused ? aud.play() : aud.pause();
})();
</script>
帖子代码
<style>
#papa {
margin: 0 0 0 calc(50% - 721px);
position: relative;
display: grid;
place-items: center;
width: 1280px;
height: 846px;
box-shadow: 3px 3px 20px #000;
z-index: 1;
overflow: hidden;
}
.bgpic {
position: absolute;
width: 640px;
height:423px;
left: 0;
top: 0;
content: url('https://638183.freep.cn/638183/t23/3/mwhxyb.jpg');
}
.bgpic:nth-of-type(2) {
top: 423px;
transform: rotateX(180deg);
}
.bgpic:nth-of-type(3) {
left: 640px;
transform: rotateY(180deg);
}
.bgpic:nth-of-type(4) {
left: 640px;
top: 423px;
transform: rotateX(180deg) rotateY(180deg);
}
#btnplay {
cursor: pointer;
z-index: 1;
animation: rotating 5s infinite linear var(--state);
}
#vid {
position: absolute;
right: -162px;
width: 1442px;
height: 846px;
mix-blend-mode: screen;
object-fit: cover;
pointer-events: none;
}
@keyframes rotating {
to { transform: rotate(1turn); }
}
</style>
<div id="papa">
<div class="bgpic"></div>
<div class="bgpic"></div>
<div class="bgpic"></div>
<div class="bgpic"></div>
<video id="vid" src="https://img.tukuppt.com/video_show/7165162/00/19/45/5f0825112d55a.mp4" autoplay loop muted></video>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=1478140139" autoplay loop></audio>
<img id="btnplay" src="https://638183.freep.cn/638183/t23/btn/meihua_133482968750383750.png" alt="" title="播放/暂停" />
</div>
<script>
(function() {
let mState = () => {
aud.paused ?
(papa.style.setProperty('--state','paused'), vid.pause()) :
(papa.style.setProperty('--state','running'), vid.play());
};
aud.addEventListener('playing', mState, false);
aud.addEventListener('pause', mState, false);
btnplay.onclick = () => aud.paused ? aud.play() : aud.pause();
})();
</script>
这拼出来的背景也太有想象力了,这个厉害{:4_199:} 在黑黑美妙的帖子里,一起迎接新的一年{:4_199:} 红影 发表于 2023-12-29 12:26
这拼出来的背景也太有想象力了,这个厉害
这是平面几何的说{:4_170:} 很奇特的背景{:4_204:} 新年快乐{:4_204:} 侃大山 发表于 2023-12-29 18:25
新年快乐
{:4_191:} 侃大山 发表于 2023-12-29 18:25
很奇特的背景
拼装的 红影 发表于 2023-12-29 12:27
在黑黑美妙的帖子里,一起迎接新的一年
{:4_180:} 马黑黑 发表于 2023-12-29 17:35
这是平面几何的说
黑黑的构思很开阔,太赞了{:4_199:} 马黑黑 发表于 2023-12-29 19:29
谢谢香茶{:4_187:} 貌似凭空长出一幅栩栩如生的美丽图画来。太厉害了! 借梅花献给大家,祝大家新年快乐! 樵歌 发表于 2023-12-29 19:56
借梅花献给大家,祝大家新年快乐!
{:4_190:} 红影 发表于 2023-12-29 19:45
谢谢香茶
客气客气 红影 发表于 2023-12-29 19:44
黑黑的构思很开阔,太赞了
{:4_172:} 樵歌 发表于 2023-12-29 19:55
貌似凭空长出一幅栩栩如生的美丽图画来。太厉害了!
晚上好 马黑黑 发表于 2023-12-29 22:26
客气客气
又香又暖的茶,这时最需要呢{:4_173:} 马黑黑 发表于 2023-12-29 22:26
这样组合出来的图图,也很有特色{:4_187:}