状态伪类
建二个文件。1html 2css
html
<html>
<head>
<title>状态伪类</title>
</head>
<link rel="stylesheet" herf="css2/fake-class.css"/>
<body>
<ul class="list">
<li class="li">item1</li>
<li class="li">item2</li>
<li class="li">item3</li>
<li class="li">item4</li>
<li class="li">item5</li>
<li class="li">item6</li>
<li class="li">item7</li>
<li class="li">item8</li>
<li class="li">item9</li>
<li class="li">item10</li>
</ul>
</body>
</html>
css
css2/fake-class.css
鼠标放到相应行时,显示颜色,显示手形状态,缓慢显示
.list li:nth-of-type(even){background-color:red; cursor:pointer;transition:0.4}s