https://jsfiddle.net/98uo6h2e/2/
所以我用下面的代码做了一个透视效果。我想将.hello2排除在仅使用CSS的变换和/或透视效果之外。我该怎么做呢?
已尝试在.hello中将transform & webkit重新指定为none/unset/initial,但未发生任何情况。
<table id="hello">
<tbody>
<tr>
<td>
<div class="hello2">
<strong>Test</strong>
<h2>Test2</h2>
</div>
</td>
</tr>
</tbody>
</table>
table#hello:not(.hello2) {
-webkit-perspective-origin: center top;
-webkit-perspective: 100;
}
tbody:not(.hello2) {
transform: rotate3d(0.1, 0, 0, 40deg);
-webkit-transform-origin: center top;
}
.hello2 {
-webkit-transform-origin: initial;
-webkit-perspective-origin: initial;
-webkit-perspective: initial;
}发布于 2019-06-04 11:32:04
您可以使用:not选择器。
table#hello:not(.hello2) {
-webkit-perspective-origin: center top;
-webkit-perspective: 100;
}
tbody:not(.hello2) {
transform: rotate3d(0.1, 0, 0, 40deg);
-webkit-transform-origin: center top;
}https://stackoverflow.com/questions/56436536
复制相似问题