Div from the right side of the page in the animation

2

I have a div that is a cell phone and when I go down the page performs the animation but before running the animation this div is getting off the page breaking the whole layuout

My div

<div class="col-md-5 ml-auto">
    <div class="iphone-container" style="max-width: 450px !important;" [@scrollAnimation]="state">
        <img src="assets/img/iphone6-2.png">
    </div>
</div>

She gets this white band and on smartphones is much bigger

Astheanimationisexecuted,thetrackappearsbecausetheimageisinitscorrectpositionbysettingoverflow:hiddenIwasabletolimittheerrorbutthenitisasifitcameoutofthemiddleofthepageitbecomesugly

    
asked by anonymous 24.05.2018 / 19:40

1 answer

2

I think that putting a overflow on the X axis in HTML and body should solve your problem.

    html,
    body {
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }
    
24.05.2018 / 19:44