Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCSS 在夜间模式/深色模式中的使用与探索 #73
Open
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
本文未完成....
法一:使用 filter: invert
主要借助 invert 这个滤镜实现,定义一个
.dark-mode-invert挂载在全局根元素<html>上:图片不能使用
filter: invert处理,需要再 invert(100%) 转变回来。尝试使用掘金作为例子试了下:
转换前:

转换后:

缺点:
法二:使用混合模式 mix-blend-mode: difference