- 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.tw/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>
結果
確認結果。
廣告