CSS Background Size & Attachment | Class 23 | || Coding college ||

Опубликовано: 21 Март 2026
на канале: Coding College
4,731
6

#codingcollege#backgroundsize#backgroundattachment#CSS#learncss

In this video we learn:
The background-size CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space.

Facebook Page:   / codingcollege1  
______________________________
Instragram Page:   / basicprograming  
______________________________
If you want to learn complete HTML5 Course then follow the link:-    • HTML 5 Full Course For Beginners.  
____________________________
If you want to learn complete CSS 3 Course then follow the link:-
   • CSS 3 Introduction For Beginners in Urdu/H...  
___________________________

The best website background image size is 1920 x 1080 pixels, according to Malama Online Marketing, and the ideal ratio is 16:9. The dpi (dots per inch) should be at least 72, yet you still want to keep the file size as small as possible to minimize site load times.
#codingcollege
#imagesize
#backgroundimagesize
#backgroungattachment
#cssfullcoursecodingcollege
#css
#CSS3
#fixedandscroll
#containandcovrsizeimg
We can do this purely through CSS thanks to the background-size property now in CSS3. We'll use the html element (better than body as it's always at least the height of the browser window). We set a fixed and centered background on it, then adjust it's size using background-size set to the cover keyword