HTML CSS examples for Bootstrap Class List:img-responsive
.img-responsive - Makes an image responsive
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.6/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script> </head><!-- w ww.j a v a 2 s.c o m--> <body> <div class="container"> <h2>Image</h2> <p>The .img-fluid class makes the image scale nicely to the parent element:</p> <img class="img-fluid" src="https://www.java2s.com/style/demo/Opera.png" alt="Chania" width="460" height="345"> </div> </body> </html>