<style>
#democ ul li p
{
text-align: left;
font-size: 5px;
line-height:30px;
height: 30px;
overflow: hidden;
padding-left:3px;
margin: 5px 0px;
}
</style>
<p>aaaa</p>
<p>bbbb</p>
uj5u.com熱心網友回復:
li p:nth-of-type(1) {}li p:nth-of-type(2) {}
uj5u.com熱心網友回復:
#democ ul li p:first-of-type {}//第一個#democ ul li p:last-of-type {}//第二個or最后一個
uj5u.com熱心網友回復:
方法很多,你可以給p標簽加上類名,或者是:nth-child()和first-of-type,這兩種偽類選擇器轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/37210.html
標籤:HTML(CSS)
上一篇:css漸變求助
