1.

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%The question was asked during an interview.Enquiry is from Responsive Overview topic in division Advance HTML of HTML

Answer»

Right option is (C) cover

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



Discussion

No Comment Found

Related InterviewSolutions