Position fixed not working on Windows Safari

后端 未结 2 694
终归单人心
终归单人心 2021-01-13 10:20

I had a problem with gallery that is position:fixed; and the site content is scrolling over it. That position fixed worked in every single browser except in Safari on Window

2条回答
  •  生来不讨喜
    2021-01-13 11:04

    I don't know if this will help anyone - but I had this problem with making a drop down menu in twitter bootstrap V3.2.0 align to the left of the page (actually making a horizontal sub-menu that filled the width of the page). It only seemed to fail in safari (desktop and iphone). After hours of hunting I found bootstrap V3.1.0 worked and traced the difference to this

    .navbar-fixed-top, .navbar-fixed-bottom {
    position: fixed;
    right: 0;
    left: 0;
    z-index: 1030;
    -webkit-transform: translate3d(0, 0, 0);
    -o-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    }
    

    Specifically the three translate3d lines at the bottom were preventing the position:fixed from working for me.. once I removed those everything was golden.

提交回复
热议问题