IE 7/8:活动块上的伪元素 [英] IE 7/8: Active Pseudo on Block Elements
本文介绍了IE 7/8:活动块上的伪元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我遇到了问题IE7 / 8忽略:显示:块的元素上的活动伪类;
i have run into problem regarding IE7/8 ignoring the :active pseudo class on elements with display:block;
HTML: / p>
HTML:
<a>My Link</a>
CSS This Works:
a:active{color:yellow}
> 无法使用的CSS :
a{display:block}
a:active{color:yellow}
有没有人知道这个解决方案,还是我必须诉诸JS?
Does anyone know of a solution to this, or will I have to resort to JS?
推荐答案
讽刺的是,@Kevin已经修正了你的问题而没有意识到。
Ironically, @Kevin already "fixed" your problem without even realising.
从此处更改HTML:
<a>My Link</a>
:
<a href="#">My Link</a>
并且它在IE7中可用,请参阅: http://jsbin.com/exuga3
and it works in IE7, see: http://jsbin.com/exuga3
当您拥有
Unexpected things like this can happen when you have <a>
tags without an href
attribute.
如果您
这篇关于IE 7/8:活动块上的伪元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文