开发者

Proper CSS syntax multiple classes

This works fine:

ul.tabs a.current:hover {
    background-position: -420px -31px;  
    color:#000; 
}   

but this dosent

ul.tabs a.commentArea.current:hover {
     background-position: -420px -31px; 开发者_如何学Go
     color:#000; 
    }

Im getting the indication that I wrote this style incorrectly, as the css isnt working on my element. How would I write this correctly...proper syntax?


It has to be

a.commentArea:hover

selectors targeting the same element must not be separated by spaces.


no space before :hover

ul.tabs a.commentArea:hover


ul.tabs a.commentArea:hover

Remove the space before :hover

See http://www.w3schools.com/CSS/css_pseudo_classes.asp

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜