Is Materialize Navbar height adjustment possible?

前端 未结 2 551
夕颜
夕颜 2021-02-07 19:08

Is it possible to adjust the height of the Navbar in Materialize?

64px is a bit too much for my site. I was going for 30px before I decided to materialize it.

相关标签:
2条回答
  • 2021-02-07 19:43

    You have to override some CSS properties:

    nav {
        height: 30px;
        line-height: 30px;
    }
    
    nav i, nav [class^="mdi-"], nav [class*="mdi-"], nav i.material-icons {
        height: 30px;
        line-height: 30px;
    }
    
    nav .button-collapse i {
        height: 30px;
        line-height: 30px;
    }
    
    nav .brand-logo { 
        font-size: 1.6rem; 
    }
    
    @media only screen and (min-width: 601px){
        nav, nav .nav-wrapper i, nav a.button-collapse, nav a.button-collapse i {
            height: 30px;
            line-height: 30px;
        }
    }
    
    0 讨论(0)
  • 2021-02-07 19:51

    You can add class on nav tag like that :

    nav {
                height: 30px;
            line-height: 30px;
        }
    
    0 讨论(0)
提交回复
热议问题