How to make background image responsive using css?

Responsiveness of website matters a lot these days. Users visit website via various gadgets of different screen sizes. So while making website responsive you need to work on background images too. This can be achieved easily by using a css property ” background-size ”

Lets do it with an example :

Here ” background-size : contain; ” does the required task.


Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: