I've got unordered-list.
- Home
- Blog
- About
- 开发者_运维知识库Contact
Use CSS3 here is a good info about what you need :nth-child(). For fail safety, because not every browser supports CSS3, in addition you can assign id with a property to the elements of ul.
Agree with Bakudan, it works
-- HTML
-- CSS
.menu li:nth-child(1){
color:green;
width:52px;
}
Have a look here : http://jsfiddle.net/geekonweb/WZEGk/
精彩评论