Use CSS to make an image scale up and down -
I have an image in the header of my website, I want to use CSS property to spread it to the width of the browser , So that the browser responds to the user adjusting the window size, and this is why the vertical axis of the image should be increased accordingly. Can it really be something?
Percentage will keep an image in full width, and the browser will update the image on resizing.
If you want to stretch the image always , then you can use it:
img {width: 100%; } However, this can easily be a safe way that the image can look like total crap:
img {max-width: 100 %; } In some way the image will have a changing shape with browser resizing. However, the second will not spread the image behind the natural shape, so it does not look distorted.
Comments
Post a Comment