I have a background image that I'm working with. Is there a way to preserve the aspect ratio of the image even when using background-size: cover;
? Currently, the image fits perfectly on the screen but appears slightly distorted. I've experimented with setting height: auto;
and adjusting the height value, but it seems that background-size: cover;
does not allow for manipulation of the height property.
Is there a method to adjust the height while maintaining the aspect ratio? Essentially, is there a way to vertically stretch the background image without distorting it?