Is Materialize Navbar height adjustment possible?

2019-03-19 03:18发布

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.

标签: materialize
2条回答
趁早两清
2楼-- · 2019-03-19 03:36

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;
    }
}
查看更多
放荡不羁爱自由
3楼-- · 2019-03-19 03:37

You can add class on nav tag like that :

nav {
            height: 30px;
        line-height: 30px;
    }
查看更多
登录 后发表回答