S

Santosh Mishra • 1.66K Points
Master

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%
  • Correct Answer - Option(B)
  • Views: 121
  • Filed under category CSS

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics