首页 > 网站 > WEB开发 > 正文

css3常用属性之选择器

2024-04-27 14:29:26
字体:
来源:转载
供稿:网友
CSS3常用属性之选择器

之前记录过一篇关于css3属性在表现方面的例子,今天在来讲讲css3选择器的使用方法。

第一个子节点;first-child

   /*first-child 所在元素为父元素的第一个子节点*/    ul li:first-child{    border:1px solid red;    }

ipXucpVrnLV77VcKe4qV7nKVa5y1e+1XCnuKle5ylWuctXvtVwp7ipXucpVrnLV77VcKe4qV7nKVa5y1e+1XCnuKle5ylWuctXvtVwp7ipXucpVrnLV77VcKe4qV7nKVa5y1e+17iDFKRQXl1+Hbf3sKlf9SuVaiq76jdRyU9xVrvrly1GK/yofxFX/Py/7hedaiq76VcqV4q76XZUrxV312yhXirvqN1KuFHfV76pcKe6q30a5UtxVv5FypbirflflSnFX/TbKleKu+o2UK8Vd9bsqV4q76rdRrhR31W+k/mUpDuy7RaDst7KO779J2XcDR24G9t8gUPbexAH7b5LHrQ78ZLX/J+DAT+CBn4GDJOTZDvxkz6b5wE0cePAWcYy/xEfAAzepB2/hQPcbVgdv2XC/CbrfAA/eMM9w8GfQctVtLqS6j1Hdx6nuE1T3car7mGWqpd/l4C2q+xjoMQ56TOCIa6ket6wzHLwFuI8D7uOgxxjoMUZ1XwS/yjpiaZ6wNUageI5RPMcoHhMU2x7AcxLwnAS9pgCvKcBzCvSaBr2mAc8phygekw4RDebLvacA7ymKl5XThWe/ggPK/n605mY4ZyKSOxXXKqELFpKEC4xuNasXYvVCzF4o87Qh61tD3rAp94Ix97y+5LKpcMSUN2zMHzHkjxiKLhsLRvWFlwyFo8bcC7rccyZGn+5IM+RdA3nXGgO5+iAuHNauC+/QhnZoD3H1+2u0ng06T47BvdbgXWYKqEa8aqFdjfqDXPhwjWl/vfZgPerJ0XrX63zqjN51Jq96g1e9zouj9WwwejaYcB71JBzjv4BlNk+OyYNjPnavN/yyjO51ix2sMx6s09sxHqxdvgM1hmXYV6PfX613r9IfrNQdrNQdqNDuL8f2liJ7SqBvijVfF6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