Show DIV on MouseOver

前端 未结 2 1615
春和景丽
春和景丽 2021-01-14 11:42

On mouseover can this div be attached to the mouse pointer so that its contents are shown on mouseover?

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-14 12:10

    Try this:

    But for that to work, the div should be visible first. However, if the div is hiddne (display:none) then onmoueever event won't be able to find the div and no event will be triggered on it. Having said that, try this which uses visibility property.

提交回复
热议问题