当鼠标悬停在图像上时如何显示包含信息的窗口?”

问题描述 投票:0回答:1
html css image web mobile
1个回答
0
投票

添加工具提示的基本且最简单的方法是您可以使用图像中的

title
属性。

 <img src="https://m.media-amazon.com/images/I/81YFrKSH40L._AC_UF894,1000_QL80_.jpg" alt="Imagem" width="114" height="114" title="5 Minute Dungeon">

或者如果您想更多地探索其他人。

您可以从以下一些参考开始:

https://www.w3schools.com/bootstrap/bootstrap_ref_js_tooltip.asp

https://atomiks.github.io/tippyjs/

© www.soinside.com 2019 - 2024. All rights reserved.