示例
现场演示
<!DOCTYPE html> <html> <style> #mytooltip #mytext { visibility: hidden; width: 100px; background-color: black; color: #fff; text-align: center; border-radius: 3px; padding: 10px 0; position: absolute; z-index: 1; } #mytooltip:hover #mytext { visibility: visible; } </style> <body> <div id = "mytooltip">Hover the mouse over me <p id = "mytext">My Tooltip text</p> </div> </body> </html>
以上就是使用 CSS 创建当用户将鼠标移动到元素上时出现的工具提示的详细内容,更多请关注php中文网其它相关文章!
已抢26676个
抢已抢14124个
抢已抢7092个
抢已抢8604个
抢已抢17577个
抢已抢7039个
抢