W3.CSS-图片

W3.CSS提供了一些选项,以w3-image作为主要类,以美观有趣的方式显示图像。

序号类名和描述
1个w3-image
表示没有任何边框的基本样式图像。
2w3-circle
在圆圈内显示图像
3w3-title
用于在图像上放置文本。
4w3-card
将图像绘制为卡片。

w3css_images.htm

<html>
   <head>
      <title>The W3.CSS Images</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>Images Demo</h2>
      <hr/>
      <h3>Simple Image</h3>
      <div class = "w3-image">
         <img src = "html5-mini-logo.jpg" alt = "html5">
      </div>
      
      <h3>Circled Image</h3>
      <div class = "w3-image">
         <img src = "html5-mini-logo.jpg" alt = "html5" class = "w3-circle">
      </div>
      
      <h3>Text over image</h3>
      <div class = "w3-image"><img src = "html5-mini-logo.jpg" alt = "html5">
         <div class = "w3-title w3-text-black">Learn HTML5</div>
      </div>
      
      <h3>Image as a card</h3>
      <div class = "w3-image">
         <img src = "html5-mini-logo.jpg" alt = "html5" class = "w3-card-4">
      </div>
   </body>
</html>

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

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

相关推荐

发表回复

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