pemilih negatif

:not ialah pemilih negatif, yang boleh menapis elemen yang tidak mahu dipadankan Contoh kod adalah seperti berikut:

<!DOCTYPE html>
<html>
<head>
<meta charset=" utf-8">
<meta name="author" content="http://www.php.cn/" />
<title>php中文网</title>
<style type="text/css">
ul li{}
input:not(:disabled){
  color:green;
}
</style>
</head>
<body>
<ul>
  <li><input type="text" value="php中文网"/></li>
  <li><input type="text" disabled value="php中文网"/></li>
</ul>
</body>
</html>


.
Meneruskan pembelajaran
||
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html>
<head>
<meta charset=" utf-8">
<meta name="author" content="http://www.php.cn/" />
<title>php</title>
<style type="text/css">
ul li{}
input:not(:disabled){
color:green;
}
</style>
</head>
<body>
<ul>
<li><input type="text" value="php"/></li>
<li><input type="text" disabled value="php"/></li>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
图片放大关闭