<html> <head> <title>Tippy</title> </head> <body> <button data-tippy-content="我是你大爷">Text1</button> <button data-tippy-content="我是你二大爷">Text2</button> <button data-tippy-content="我是你三大爷">Text3</button> <button data-tippy-content="我是你四大爷">Text4</button> <button data-tippy-content="我是你五大爷">Text5</button> <script src="https://unpkg.com/@popperjs/core@2"></script> <script src="https://unpkg.com/tippy.js@6"></script> <script> tippy('[data-tippy-content]'); </script> </body> </html>
简单粗暴,复制粘贴,浏览器打开。看效果,喜欢就撸就完了!!!