Pure.CSS - 图片
Pure.CSS 为使用 `pure-image` 作为主类的响应式图片显示提供了选项。
序号 | 类名和说明 |
---|---|
1 | pure-img 代表没有边框的基本样式图片。图片随着内容增长和缩小,同时保持正确的比例。 |
示例
purecss_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://yui.yahooapis.com/pure/0.6.0/pure-min.css"> </head> <body> <h2>Images Demo</h2> <hr/> <div class = "pure-g"> <div class = "pure-u-1-4 pure-u-lg-1-8"> <img class = "pure-img" src = "html5-mini-logo.jpg" alt="html5"> </div> <div class = "pure-u-1-4 pure-u-lg-1-8"> <img class = "pure-img" src = "html5-mini-logo.jpg" alt = "html5"> </div> <div class = "pure-u-1-4 pure-u-lg-1-8"> <img class = "pure-img" src = "html5-mini-logo.jpg" alt="html5"> </div> <div class = "pure-u-1-4 pure-u-lg-1-8"> <img class = "pure-img" src = "html5-mini-logo.jpg" alt = "html5"> </div> <div class = "pure-u-1-4 pure-u-lg-1-8"> <img class = "pure-img" src = "html5-mini-logo.jpg" alt = "html5"> </div> <div class = "pure-u-1-4 pure-u-lg-1-8"> <img class = "pure-img" src = "html5-mini-logo.jpg" alt = "html5"> </div> <div class = "pure-u-1-4 pure-u-lg-1-8"> <img class = "pure-img" src = "html5-mini-logo.jpg" alt="html5"> </div> <div class = "pure-u-1-4 pure-u-lg-1-8"> <img class = "pure-img" src = "html5-mini-logo.jpg" alt = "html5"> </div> </div> </body> </html>
结果
验证结果。
广告