lundi 4 juillet 2016

background-size: cover; Can we reverse clip direction?

The CSS3 rule 'background-size: cover;' starts at the top left of a div and stretches the background image in aspect ratio so that it dynamically covers the width of the div.

For a particular image I have, it would look a lot better at higher width screens if 'background-size: cover;' started the image from the bottom left of the div (div has fixed height) and covered up and to the right. This way the sky of the image would not be the only thing visible on wide monitors.

After some trial and research I have come up empty. Is this possible?

Thank you

1 commentaire:

  1. Nice article. It's very helpful to me. Thank you for share with us. Can you please check my rgba color picker online tool.

    RépondreSupprimer