源代码:
提交运行 »
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> <link rel="stylesheet" href="http://www.fmpq.com/jscss/bootstrap/bootstrap.min.css"> <script src="http://www.fmpq.com/jscss/bootstrap/jquery.min.js"></script> <script src="http://www.fmpq.com/jscss/bootstrap/bootstrap.min.js"></script> </head> <body> <div class="container"> <h2>图片</h2> <p> .img-responsive类让图片支持响应式,将很好地扩展到父元素 (通过改变窗口大小查看效果):</p> <img src="/images/htmlcss/cinqueterre.jpg" class="img-responsive" alt="Cinque Terre" width="304" height="236"> </div> </body> </html>
测试结果: