css媒体切换
需要基于模板修改成需要的样式
@media (prefers-color-scheme: light) {
.article {
background:#fff;
color: #000;
}
}
@media (prefers-color-scheme: dark) {
.article {
background:#000;
color: white;
}
}
@media (prefers-color-scheme: no-preference) {
.article {
background:#fff;
color: #000;
}
}
在此基础上修改即可
对于图片亮度的css
img {
-webkit-filter: brightness(50%)! important;
-moz-filter: brightness(50%) ! important;
}
标签:background,color,media,000,暗黑,article,scheme,CSS
From: https://www.cnblogs.com/lxrvm/p/17177903.html