我目前即将设置我们的论坛并已制作验证系统,但不知道如何制作类似Facebook的工具提示。一旦将鼠标悬停在检查图像上,您将看到某种文本。小图片工具提示
我已经尝试了一些方法来实现它,但没有奏效。
HTML
img标签包含这些:
data="BroHosting confirmed that this profile is an authentic for person, media, brand or company." class="tip"
CSS /样式
img:hover {
color: red;
position: relative;
}
img[data]:hover:after {
content: attr(data);
padding: 4px 8px;
color: rgba(0,0,0,0.5);
position: absolute;
left: 0;
top: 100%;
white-space: nowrap;
z-index: 2;
border-radius: 5px ;
background: rgba(0,0,0,0.5);
}
您是否有可能的修补程序或其他想法或建议?
其实你有什么期望? –
查看Facebook页面,我在这里列出并将鼠标悬停在蓝色检查上。 – Marcell
好的。我现在明白了。为什么不使用引导工具提示?https://www.w3schools.com/bootstrap/bootstrap_tooltip.asp –