<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
/* 没有效果 */
.track-s:last-child::after{
content:"aa";
color: red;
}
/* 有效果 */
.track-e:last-child::after{
content:"aa";
color: red;
}
</style>
</head>
<body>
<ul>
<li class="track track-s">1</li>
<li class="track track-s">2</li>
<li class="track track-s">3</li>
<li class="track track-e">4</li>
<li class="track track-e">5</li>
</ul>
</body>
</html>
为什么这种写法( .track-s:last-child::after)没效果,但是 .track-e:last-child::after 就行