我有一个容器,我想对其应用 mix-blend-mode: 差异以与其父容器和父容器的父容器混合(等等)。当我应用混合模式时,容器仅与其父容器混合。我怎样才能达到我之前描述的结果。
代码结构是这样的:
.sec1 {
position: absolute;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
background-color: black;
}
.sec2 {
position: absolute;
left: 0;
top: 100vh;
width: 100vw;
height: 100vh;
background-color: white;
}
.svg1 {
position: fixed;
...
}
<section class="sec1">
<section class="sec2">
<svg class="svg1" ...>
<text ... style="...;mix-blend-mode:difference;"></text>
</svg>
</section>
</section>
提前致谢。