+ 1
how to reduce and adjust the background images.
2 ответов
+ 4
background-size=
"Auto" is the default value and will keep width and height of the image.
"Lenght" let's you manually set width and height. If only one si given the other is set to "Auto".
"Percentage" let's you set width and height in percentage of the parent element.
"Cover" makes the image cover as much as possible.
"Contain" sets width and height to the largest value based on the content area.
Anyway the best practice is to scale the image and optimise it for your website. It will make it look nice without interfering too much on the CSS and also help your load times.
0
Also simply like this.
<img src="testimage" length="100px" width="90px" padding="20%" />
Replace my values with yours and you can add other stuff like alignment and what @Florin Damian Dragos said