Tooltip on click of a button

后端 未结 7 951
执笔经年
执笔经年 2021-01-01 20:31

I\'m using clipboard.js to copy some text from a textarea, and that\'s working fine, but I want to show a tooltip saying \"Copied!\" if it was successfully copi

相关标签:
7条回答
  • 2021-01-01 21:19

    *[tooltip]:focus:after {
      content: attr(tooltip);
      display:block;
      position: absolute;    
    }
    <button tooltip="I'm tooltip">Button</button>
    <br><br>
    <a href = "javascript:void(0)" tooltip = "I'm tooltip">Link</a>

    0 讨论(0)
提交回复
热议问题