I am using Boot Strap 3 for my new responsive layout. For my home page I have background image. Please advise how to use different background images depending on screen resolution. I cannot use responsive class. Please use below URL to review the layout.
http://idea66.com/mobile/screenshot.png
If I create this structure for different screen type, how can we call them using Boot Strap 3.0
Thank you Monica
Bootstrap has the built-in img-responsive class for this purpose. This applies max-width: 100%;, height: auto; and display: block; to the image so that it scales nicely to the parent element. Show activity on this post. I've been trying this morning a bit and I finally got it to work.
To make an image responsive in Bootstrap, add a class . img-responsive to the <img> tag. This class applies max-width: 100%; and height: auto; to the image so that it scales nicely to the parent element.
Images in Bootstrap are made responsive with . img-fluid . max-width: 100%; and height: auto; are applied to the image so that it scales with the parent element.
Create responsive images by adding an . img-responsive class to the <img> tag. The image will then scale nicely to the parent element.
You can have CSS with media queries. Example:
@media (max-width: 979px) {
body {
background: white url(medium.jpg);
}
}
@media (max-width: 767px) {
body {
background: white url(small.jpg);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With