dahlsdata-tahira
dahlsdata-tahira

Reputation: 359

Prevent increasing window-width when sliding out - CSS3 animation

I am applying an animation at a div element. The animation slides the element into the viewport and slides it out again. My problem is, that when the element is leaving the viewport, the window-width is increasing. You can see that by the scrollbar at the bottom. How can I prevent that from happen? I want that the window keep its size.

Here is my HTML:

<div class="x1">
    <div class="cloud"></div>
</div>

Here you can see the JSFiddle: https://jsfiddle.net/kh7bLdv5/5/

Thanks in advance!

Upvotes: 0

Views: 196

Answers (1)

SvenL
SvenL

Reputation: 1954

Simply add overflow-x: hidden to your body tag.

Upvotes: 3

Related Questions