【发布时间】:2022-01-11 11:49:25
【问题描述】:
我发现了一个有趣的 SCSS 示例 dynamic moving background colors, Floating Stained Glass Effect。想想多色熔岩灯。这是原来的codepen.
我想要实现的是该背景内容的简单“剪辑”,并显示具有动态颜色内容的 div...我当前的codepen 和显示。
我正在寻找的是仅在刻有“框”的动态内容,屏幕上的其他所有内容都是纯白色的。
<div class="splash box">
<div class="splash_head" />
<div class="splash_body" />
</div>
我在overflow: hidden; 的所有尝试都惨遭失败。不知道如何击败 position: fixed; 内的代码
.splash_head::before,
.splash_head::after,
.splash_body::before,
.splash_body::after {
position: fixed;
top: 50%;
left: 50%;
width: 3em;
height: 3em;
content: "V";
mix-blend-mode: screen;
animation: 44s -27s move infinite ease-in-out alternate;
}
【问题讨论】: