Show text when the cursor hovers over an image

后端 未结 6 628
轮回少年
轮回少年 2021-01-03 02:45

I am trying to accomplish of the task of displaying text below an image when you hover over it. I do not want to use the title attribute, because I want to be a

6条回答
  •  滥情空心
    2021-01-03 03:44

    Define a function with the argument as the text you want to display on hovering the image. Then in that function you dynamically create a div and place the text within that div and also dynamically position the div according to the mouse pointer position and you can also add css for the div give ur styling effects. Call this function on the mouseover of the image. Hope this helps you.

提交回复
热议问题