What should be the set value of background-size property such that image will cover the entire content area?

Nguyễn Pháp

New member
What should be the set value of background-size property such that image will cover the entire content area?
A. 100%
B. contain
C. cover
D. 100%100%
 
Answer: c
Explanation: If background-size property is set to “cover”, background image will scale to cover entire content area. “cover” value keeps the aspect ratio and some part of background image may be clipped. E.g. div {width: 100%; height: 390px; background-image: url(‘img_tyu.jpg’); background-size: cover;}
 

Tìm kiếm

Back
Top