Bootstrap 3 Nav-bar change color cause showing a white border or white line

前端 未结 2 477
一生所求
一生所求 2021-01-01 06:02

Base on this fiddle. how do i remove the white line.. I tried to change the color of the nav-bar but there is a white line when its on mobile

相关标签:
2条回答
  • 2021-01-01 06:28

    Nice found the issue

    .navbar-collapse{
    border-top:0px !important;
     box-shadow:none;
    }
    

    after animation it adds a border top

    wait ill give a fiddle

    fiddle

    0 讨论(0)
  • 2021-01-01 06:42

    You need to fix top border of .navbar-collapse (it's Bootstrap's #e6e6e6 border color you see):

    .navbar-default div.navbar-collapse
    {
        border-top:none;
        box-shadow:none;
    }
    

    After disabling it with border-top:none you will still notice a slightly dim line which is because there is a box-shadow rule, you need to override it too with box-shadow:none.

    Live fiddle: http://jsfiddle.net/keaukraine/ZfYNG/

    In this fiddle you will find 2 ways of fixing top border - by setting its color to #3b5998 and completely disabling it.

    0 讨论(0)
提交回复
热议问题