Twitter Bootstrap modal opening/closing causes fixed header to jump

后端 未结 14 2289
旧时难觅i
旧时难觅i 2021-01-08 01:39

I am almost done with a simple 2-page website for my registered domain names. Unfortunately I have one small issue I can\'t seem to fix: a jumpy header when a Twitter Bootst

相关标签:
14条回答
  • 2021-01-08 02:04

    Another solution is to add:

    .modal-open .navbar-fixed-top {
      overflow-y: scroll;
    }
    

    to prevent its content from jumping. Again, easy as that.

    0 讨论(0)
  • 2021-01-08 02:04

    In 4.5, the following code solved my issue of the fixed header sliding left.

    body.modal-open {
        position: fixed;
        overflow-y: scroll;
        width: 100%;
        padding-right: 0!important;
      }
      .modal-open .fixed-top {
        padding-right: inherit!important;
      }
    
    0 讨论(0)
提交回复
热议问题