黑暗模式和浅色模式的开发和维护工作就变得相对容易很多,除此之外,这个CSS自定义属性我们还可以用来给JS做模式识别。
@media (any-hover: none) {
.example-zxx {
text-decoration: none;
background-color: #ffffe0;
}
}
@media (any-hover: hover) {
.example-zxx {
text-decoration: underline;
}
}
网友评论