根据背后的内容逆颜色

2022-05-05

以下示例是关于Html中包含根据背后的内容逆颜色用法的示例代码,想了解根据背后的内容逆颜色的具体用法?根据背后的内容逆颜色怎么用?根据背后的内容逆颜色使用的例子?那么可以参考以下相关源代码片段来学习它的具体使用方法。

文件名:html[英]:後ろのコンテンツに合わせて色を反転させる源码类型:Html
<p class="hoge">反転</p>
<div style="background-color:black; height:200px;"></div>
<div style="background-color:white; height:200px;"></div>
<div style="background-color:black; height:200px;"></div>
<div style="background-color:white; height:200px;"></div>
文件名:scss[英]:後ろのコンテンツに合わせて色を反転させる源码类型:Html
.hoge {
  filter: invert(100%);
  mix-blend-mode: exclusion;
  position: fixed;
  top: 2%;
  right: 2%;
}

本文地址:https://www.itbaoku.cn/snippets/785124.html