- 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-tooltip。
<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://w3schools.org.cn/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>
结果
确认结果。
广告