开发者

jQuery Droppable Hover and Active Class take Precedence?

I'm having an issue where I see my active and hover class being applied in Firebug, but it's not taking precedence over the existing styles.

So, if my element has background-color set, the active and hover background color don't change the eleme开发者_Go百科nt.

How can I fix this behavior?


Do you apply the original background-color with a class rule ? or an id rule ?

.something{background-color:...}

or

#something{background-color:...}

i am asking this because id rules have precedence over class rules

see http://www.w3.org/TR/CSS2/cascade.html#preshint for selector specificity details (as it is called). Id is only overridden by inline styles..

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜