- W3.CSS教程
- W3.CSS - 主页
- W3.CSS - 概述
- W3.CSS - 环境设置
- W3.CSS - 容器
- W3.CSS - 代码着色
- W3.CSS - 卡片
- W3.CSS - 响应式设计
- W3.CSS - 网格
- W3.CSS - 表单
- W3.CSS - 按钮
- W3.CSS - 工具提示
- W3.CSS - 模态对话框
- W3.CSS - 表格
- W3.CSS - 列表
- W3.CSS - 图像
- W3.CSS - 图标
- W3.CSS - 颜色
- W3.CSS - 导航
- W3.CSS - 实用程序
- W3.CSS 有用资源
- W3.CSS - 快速指南
- W3.CSS - 有用的资源
- W3.CSS - 讨论
W3.CSS - 工具提示
W3.CSS 使用 w3-tooltip 类支持不同类型的工具提示。看一下下面的例子。在这里,我们在 div 和图像中放置了一个工具提示文本,并在父 div 上应用了 w3- 工具提示。
<div class = "w3-tooltip">
<div class = "w3-text w3-container w3-teal" style = "width:255px;">
<p>Learn HTML5 in simply easy way @TutorialsPoint.com</p>
</div>
<div>
<img src = "html5-mini-logo.jpg" alt = "html5">
</div>
</div>
例子
w3css_tooltips.htm
<html>
<head>
<title>The W3.CSS Tooltips</title>
<meta name = "viewport" content = "width = device-width, initial-scale = 1">
<link rel = "stylesheet" href = "https://www.w3schools.com/lib/w3.css">
</head>
<body class = "w3-container">
<h2>Hover Demo</h2>
<div class = "w3-tooltip">
<div class = "w3-text w3-container w3-teal" style = "width:255px;">
<p>Learn HTML5 in simply easy way @TutorialsPoint.com</p>
</div>
<div>
<img src = "html5-mini-logo.jpg" alt = "html5">
</div>
</div>
</body>
</html>
结果
验证结果。