zoukankan      html  css  js  c++  java
  • CSS:CSS 图片廊

    ylbtech-CSS:CSS 图片廊
    1.返回顶部
    1、

    CSS 图片廊

    以下是使用CSS创建图片廊:

    图片廊

    以下是使用 CSS 创建图片廊:

    实例

    <div class="responsive">
      <div class="img">
        <a target="_blank" href="http://static.runoob.com/images/demo/demo1.jpg">
          <img src="http://static.runoob.com/images/demo/demo1.jpg" alt="图片文本描述" width="300" height="200">
        </a>
        <div class="desc">这里添加图片文本描述</div>
      </div>
    </div>
     
    <div class="responsive">
      <div class="img">
        <a target="_blank" href="http://static.runoob.com/images/demo/demo2.jpg">
          <img src="http://static.runoob.com/images/demo/demo2.jpg" alt="图片文本描述" width="300" height="200">
        </a>
        <div class="desc">这里添加图片文本描述</div>
      </div>
    </div>
     
    <div class="responsive">
      <div class="img">
        <a target="_blank" href="http://static.runoob.com/images/demo/demo3.jpg">
          <img src="http://static.runoob.com/images/demo/demo3.jpg" alt="图片文本描述" width="300" height="200">
        </a>
        <div class="desc">这里添加图片文本描述</div>
      </div>
    </div>
     
    <div class="responsive">
      <div class="img">
        <a target="_blank" href="http://static.runoob.com/images/demo/demo4.jpg">
          <img src="http://static.runoob.com/images/demo/demo4.jpg" alt="图片文本描述" width="300" height="200">
        </a>
        <div class="desc">这里添加图片文本描述</div>
      </div>
    </div>
    尝试一下 »

    更多实例

    响应式图片廊

    使用 CSS3 的媒体查询来创建响应式图片廊:

    <div class="responsive">
      <div class="img">
        <a target="_blank" href="img_fjords.jpg">
          <img src="http://www.runoob.com/wp-content/uploads/2016/04/img_fjords.jpg" alt="Trolltunga Norway" width="300" height="200">
        </a>
        <div class="desc">这里添加图片文本描述</div>
      </div>
    </div>
     
     
    <div class="responsive">
      <div class="img">
        <a target="_blank" href="img_forest.jpg">
          <img src="http://www.runoob.com/wp-content/uploads/2016/04/img_forest.jpg" alt="Forest" width="600" height="400">
        </a>
        <div class="desc">这里添加图片文本描述</div>
      </div>
    </div>
     
    <div class="responsive">
      <div class="img">
        <a target="_blank" href="img_lights.jpg">
          <img src="http://www.runoob.com/wp-content/uploads/2016/04/img_lights.jpg" alt="Northern Lights" width="600" height="400">
        </a>
        <div class="desc">这里添加图片文本描述</div>
      </div>
    </div>
     
    <div class="responsive">
      <div class="img">
        <a target="_blank" href="img_mountains.jpg">
          <img src="http://www.runoob.com/wp-content/uploads/2016/04/img_mountains.jpg" alt="Mountains" width="600" height="400">
        </a>
        <div class="desc">这里添加图片文本描述</div>
      </div>
    </div>
     
    <div class="clearfix"></div>
     
    <div style="padding:6px;">
      
      <h4>重置浏览器大小查看效果</h4>
    </div>
    尝试一下 »
    2、
    2.返回顶部
     
    3.返回顶部
     
    4.返回顶部
     
    5.返回顶部
    1、
    2、
     
    6.返回顶部
     
    warn 作者:ylbtech
    出处:http://ylbtech.cnblogs.com/
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
  • 相关阅读:
    牛顿迭代法 Newton-Raphson Method
    [LeetCode]73. Sqrt(x)平方根
    [LeetCode]72. Basic Calculator基本计算器
    [LeetCode]71. Missing Number缺失的数
    [LeetCode]70. Ugly Number II第N个丑数
    [LeetCode]69. Recerse Integer旋转整数
    [LeetCode]68. Palindrome Number回文数字
    [LeetCode]67. Number of Digit One1的个数和
    [LeetCode]66. Factorial Trailing Zeros阶乘的尾零个数
    STL的容器哈希表
  • 原文地址:https://www.cnblogs.com/storebook/p/8926571.html
Copyright © 2011-2022 走看看