IE: Only part of an anchor is clickable

后端 未结 5 518
生来不讨喜
生来不讨喜 2021-02-05 18:06

I want to have an anchor with a specific height and width.

There is no text on it since it\'s meant to be put in front of a certain area of the page.

Here is the

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-05 19:01

    In previous versions of IE, its not possible to register the onclick event on block level elements themselves. Instead, IE applies the onclick to the text or inline elements inside the block.

    I've found that putting a transparent image inside the anchor that is the same size as the full anchor will register the onclick.

    
        
    
    

提交回复
热议问题