Re: Responsive Main Image in Linked Site
Posted: Thu Dec 29, 2022 1:53 am
Your demo is working correctly.
When a breakpoint is hit, yes it is resizing the background image to fit the background of the container. Since the height of the grid is different in each breakpoint it is going to "jump" to resize the image. That's just how it works. Think about it...if you are going from say 1366 x 600 to 780 x 300 it's not going to be smooth. It's going from one fixed height to another fixed height.
The only way you can get the 'smoothness' you are speaking of is you need to set the height to use a vh unit.
When a breakpoint is hit, yes it is resizing the background image to fit the background of the container. Since the height of the grid is different in each breakpoint it is going to "jump" to resize the image. That's just how it works. Think about it...if you are going from say 1366 x 600 to 780 x 300 it's not going to be smooth. It's going from one fixed height to another fixed height.
The only way you can get the 'smoothness' you are speaking of is you need to set the height to use a vh unit.