IE8 Standards mode: onclick handler on div does not fire

后端 未结 2 849
面向向阳花
面向向阳花 2021-01-16 10:39

In my application I have a row of buttons (for BBcode) that is included in various places. Each button is an empty div with fixed dimensions, a background image and an oncli

2条回答
  •  耶瑟儿~
    2021-01-16 11:38

    I had the same problem in IE8. The transparent areas in the DIVs were not clickable. An easy solution is to set the background-image to a transparent .gif.

    My solution in CSS:

    background-image: url("images/pixel.gif"); 
    

    ...where pixel.gif is a 1x1 transparent image.

提交回复
热议问题