问题是,选择处理您的:hover行为具有较低的
特异性比默认行为(规则p#id选择器)。
改变这个
.button:hover .top {to this
.button:hover #myId.top {将解决问题: Running example
您还可以将ID应用于父对象(例如说),然后使用
#container .button:hover .top {
问题是,选择处理您的:hover行为具有较低的
特异性比默认行为(规则p#id选择器)。
改变这个
.button:hover .top {to this
.button:hover #myId.top {将解决问题: Running example
您还可以将ID应用于父对象(例如说),然后使用
#container .button:hover .top {