Scrollbar appears through CSS animation/transition

后端 未结 4 1681
悲哀的现实
悲哀的现实 2021-01-01 12:20

I am animating my ng-view in Angular with a cubic-bezier transition:

/* Animations */
.slide-animation.ng-enter, .slide-animation.ng-leave           


        
4条回答
  •  时光说笑
    2021-01-01 13:09

    Two alternative to solve the flickering problem (movement left/right that happens with scrollbars appearing/disappearing fast)

    display scrollbars all the time.

    body {
      overflow-y: scroll;
    }
    

    This hack (info)

    html { 
      margin-left: calc(100vw - 100%); 
    } 
    

提交回复
热议问题