Jus*_*tin 1 css css-selectors css3
如何将此css类应用于除输入类型复选框之外的所有元素?这是我的,但它不起作用:
.dim:not(input[type="checkbox"]) {
-webkit-opacity: 0.25;
-moz-opacity: 0.25;
filter:alpha(opacity=25);
opacity: 0.25;
}
Run Code Online (Sandbox Code Playgroud)
我应用这个html:
<tr class="dim">
<td>
<input type="checkbox">
</td>
<td>
<input type="text" class="input-large enforce-label" name="labels[]" maxlength="30">
</td>
<td>
<input type="text" class="input-large" name="addresses[]" maxlength="255">
</td>
<td>
<input type="text" class="input-small" name="ssh_usernames[]" maxlength="100">
</td>
<td>
<input type="text" class="input-small enforce-ssh-port" name="ssh_ports[]" maxlength="5">
</td>
</tr>
Run Code Online (Sandbox Code Playgroud)
课堂上的所有输入都是昏暗的
.dim input{...........}
Run Code Online (Sandbox Code Playgroud)
所有输入但不是类型复选框
.dim input:not([type=checkbox]){}
Run Code Online (Sandbox Code Playgroud)
所以跟随css工作:
.dim input:not([type=checkbox]){
-webkit-opacity: 0.25;
-moz-opacity: 0.25;
filter:alpha(opacity=25);
opacity: 0.1;
}
Run Code Online (Sandbox Code Playgroud)