W3.CSS – Tooltips

W3.CSS使用w3-tooltip类支持另一种工具提示。看下面的例子。在这里,我们将工具提示文本放在div和图像中,并将w3 – Tooltips应用于父div。

<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.</p>
         </div>
         
         <div>
            <img src = "/wp-content/uploads/2020/11/w3c-480x300.jpg" alt = "html5">
         </div>
      </div>
   </body>
</html>

作者:terry,如若转载,请注明出处:https://www.web176.com/w3css/925.html

(0)
打赏 支付宝 支付宝 微信 微信
terryterry
上一篇 2020年11月3日 下午2:51
下一篇 2020年11月3日 下午2:58

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注