javascript - css3 flex centering problem
阿神
阿神 2017-06-12 09:20:46
0
1
570

I can center the element by setting justify-content:center, but why can’t the element be centered after adding position: fixed;? Doesn’t the flex layout take effect after using fixed?

 .v-stairs-nav {
         
            display: flex;
            position: fixed;
            justify-content: center;
        }
阿神
阿神

闭关修行中......

reply all(1)
学习ing

position:fixedThe document is out of standard flow. You can solve this problem by adding width:100%

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template