CSS for hover that includes all child elements

后端 未结 4 635
走了就别回头了
走了就别回头了 2020-12-30 22:05

I have a draggable div element with a hover style. This works fine, but the div contains some form elements (label, input). The problem is that when the mouse is over these

4条回答
  •  既然无缘
    2020-12-30 22:40

    This isn't a css answer, but it might still be useful to you.

    Someone else already suggested that you might have to resort to javascript for browser compatibility. If you do resort to javascript, you can use the jquery library to make it easy.

    $(".appsetting").hover(hoverInFunc,hoverOutFunc);

    This sets an event handler for hovering into and out of the selected element(s) as matched by the css style selector in the $() call.

提交回复
热议问题