admin管理员组文章数量:1332881
Whe mouse pointer placed on an element I want to show some text. For example if you place your cursor on upvote of an answer, it shows "This answer is useful". You can see it in below image. I did't even know how to search this.
Whe mouse pointer placed on an element I want to show some text. For example if you place your cursor on upvote of an answer, it shows "This answer is useful". You can see it in below image. I did't even know how to search this.
Share Improve this question asked Feb 13, 2015 at 3:49 gangadharsgangadhars 2,7287 gold badges44 silver badges72 bronze badges1 Answer
Reset to default 6Add a title
attribute to the element. That's what's done in the image above.
<a class="vote-up-off" title="This answer is useful.">up vote</a>
If you want a custom tooltip, see this answer. You would basically use a bination of pseudo elements and custom data-*
attributes. You would give the pseudo elements a content
value of attr(data-tooltip)
in order to access the data-tooltip
attribute, for instance.
本文标签: javascriptDisplay text under cursorStack Overflow
版权声明:本文标题:javascript - Display text under cursor - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742307050a2450124.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论