链接添加工具提示

将鼠标悬停在以下链接上可查看工具提示:

Tight pants next level keffiyeh you probably haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel have a terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral.

显示位置

将鼠标悬停在下面的按钮上可查看四个工具提示方向:顶部、右侧、底部和左侧

使用 HTML

使用自定义的 HTML

禁用元件

具有disabled属性的元素是不可交互的,这意味着用户不能聚焦、悬停或单击它们来触发工具提示(或弹出窗口)。作为一种解决方法,您需要从包装器<div><span>触发工具提示,最好使用tabindex="0"使键盘可聚焦,并覆盖禁用元素上的pointer-events