304

In stackoverflow, when we hover on a user's reputation we see a text. I have seen this at many places and the source code tells me that it can be done without js. And i tried and got only this-

 <div="text">hover me</div>
4

5 に答える 5

580

titleたとえば 、次の属性を使用します。

<div title="them's hoverin' words">hover me</div>

また:

<span title="them's hoverin' words">hover me</span>

于 2012-06-13T20:32:04.280 に答える
19

title 属性は、リンクなどの他の html 要素でもうまく機能します。

<a title="hover text" ng-href="{{getUrl()}}"> download link
</a>
于 2016-05-03T08:23:35.900 に答える