【发布时间】:2018-09-08 05:53:45
【问题描述】:
我想要的是排除部分应该以黄色显示。
body :not(.exclude) {
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
filter: grayscale(100%);
}
.exclude {
background: yellow;
height: 100px;
}
.gray {
background: purple;
height: 300px;
}
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div class="gray">
<div class="exclude"></div>
</div>
</body>
</html>
我试过了,但没有显示为黄色
【问题讨论】: