0

How can we increase the size of background images in HTML

14th Jun 2017, 9:30 PM
SAURABH SINGH
SAURABH SINGH - avatar
4 odpowiedzi
+ 13
background-size CSS property. :) body { background-image:url("https://upload.wikimedia.org/wikipedia/commons/5/54/Wallpaper-img_0254.jpg"); background-size:300px; background-repeat: no-repeat; }
14th Jun 2017, 9:36 PM
Maz
Maz - avatar
+ 12
@Leigh it is just for prevent the repetition of that background, if you don't insert it, the background will takes all the available space in height and width repeating itself.
14th Jun 2017, 11:14 PM
Maz
Maz - avatar
+ 7
@maz, what is the "background-repeat: no-repeat; " useful for in your answer?
14th Jun 2017, 11:01 PM
Leigh E. O.
Leigh E. O. - avatar