CSS-Background-size: Cover

This property is used when you want to have a background  image for your website. In this case the value of the attribute is set to “cover”. 

This essentially means that the image would cover the complete width and height of the container. And in case for some reason the image and the container have different dimensions then either the top and bottom parts or the left and right parts which are not covered would be removed. And the Image would be automatically centered. 


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s