.img-responsive类让图片支持响应式

2017-07-07 17:07:00
admin
原创
645
<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="http://apps.bdimg.com/libs/bootstrap/3.3.0/css/bootstrap.min.css">
  </head>

  <body>
     <div class="container">
      <h2>图片</h2>
      <p> .img-responsive类让图片支持响应式,将很好地扩展到父元素 (通过改变窗口大小查看效果):</p>                  
      <img src="http://www.ybao.org/data/upload/201705/f_f98e04fa9ff2aed692bebb9f6c0be82e.jpg" class="img-responsive" alt="Cinque Terre" width="304" height="236"> 
    </div>

    <script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="http://apps.bdimg.com/libs/bootstrap/3.3.0/js/bootstrap.min.js"></script>
  </body>

</html>
  • QQ讨论群
  • 关注微信
    • 欢迎咨询
    • 欢迎加入QQ群 16506021
  • 公众号:源宝网络