导航设置 position: fixed;时宽度的问题

头部导航固定时,使用position: fixed; 会导致导航的宽度大于容器的宽度,引起位置的偏移

.company_navfx
        {
            position: fixed;
            top: 0px;right:0;/*这句很重要*/
            width: 100%;z-index:999;height:50px;line-height:50px;
        }
原文地址:https://www.cnblogs.com/gxivwshjj/p/7725075.html