How can I hide drawer on large screens and show just on small screens.?

萝らか妹 提交于 2019-12-04 03:51:54

mdl-layout--no-desktop-drawer-button

Does not display a drawer button in desktop mode

Optional; goes on mdl-layout element

GitHub

Add the following to your css. This hides on the screens less than 1024px width

@media screen and (min-width: 1024px) {
    .mdl-layout__drawer-button {
        display: none;
    }
}
@media screen and (min-width: 992px) {
    .mdl-layout__drawer {
        display: none;
    }
}

P.S. Have no idea what is .mdl-layout--small-screen-only looks like some BEMish framework/library for something. Probably media queries are not in the correct order or you have some faily setup or whatever. I'm not a telepath. Have never been though I tried. Possly things change in some future (distant or near).

try the class

hide-on-large-only

Replace the

mdl-layout--small-screen-only

With a

mdl-cell--hide-desktop

Presto.

See here: http://mdlhut.com/2015/07/mdl-displaying-content-for-specific-viewports/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!