submit input doesn't get the :active state in IE8 when I click on the button’s text

后端 未结 4 1988
渐次进展
渐次进展 2021-01-16 14:46

In IE8 if I click exactly on the text-value on a submit button, it doesn\'t get the properties from the input:active CSS selector.

But if I click elsewh

4条回答
  •  北荒
    北荒 (楼主)
    2021-01-16 15:19

    Great, thanks Albert for mentioning the :focus selector. I was looking for a solution to the 'clickthrough' problem for a couple of hours now, without finding good information.

    My problem was a similar one to OP but for a link instead of input button.

    Basically, I have a multiline link/button and in IE it was not possible to only use the :active selector on the link to change the button's properties since the span inside the a would not 'shine' through.

    Now, I use a:active and a:focus on the a together with onclick="this.blur();" and it works like a charm for my purposes.

    Please have a look at my solution on jsFiddle: http://jsfiddle.net/pezzi/UzARF/

提交回复
热议问题