πŸ“Š CSS
Q. What should be the set value of background-size property such that image will cover the entire content area?
  • (A) contain
  • (B) cover
  • (C) 100%100%
  • (D) 100%
πŸ’¬ Discuss
βœ… Correct Answer: (B) cover

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;}

Explanation by: Santosh Mishra
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;}

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
187
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Santosh Mishra
Publisher
πŸ“ˆ
96%
Success Rate