我有一个->
我尝试使用“:not(span)”,但是没有用
HTML:
<ul id="facts">
<li>
<span>Scientific Name</span>: feline-masterrace
</li>
<li>
<span>Average Length</span>: comes in all lengths
</li>
<li>
<span>Average Lifespan</span>: as long as there's food
</li>
<li>
<span>Habitat</span>: if it fits i sits
</li>
</ul>
CSS:
ul li :not(span){
list-style: none;
font-style: italic;
}
我希望文本(即,如果适合我坐在那里)变成斜体,但跨度(即,人居环境)不斜体。