Reputation: 31
I'm applying rotation to an img
element and this is causing the viewport to change it's width, giving the user the possibility of scrolling to sides, there is a way to change this? The images are svgs
Upvotes: 0
Views: 456
Reputation: 2395
Wrap the SVG in a <div>
styled to be the same height and width as your SVG element and set overflow: hidden
on the wrapping element.
The <div>
will hide the corners of your SVG as it rotates but none of the inner SVG circle should be clipped.
Upvotes: 1