How to fit an image inside a Bootstrap 3 div?
问题 I am using a div tag in code as shown below: <div class="col-sm-6 col-md-6 col-lg-4"> <img src="images/dummy_image.png" class="img-responsive"> </div> The user can upload any kind of image and have it displayed here. I want to fit the image inside of the div , meaning specifically that I need to cover the full div using that image as it's resized. I am using Bootstrap 3.3.7. Please advise. 回答1: Just add you images width to 100%. But as you are saying user will upload various kind of images,