如何在聚合物中添加侧导航 [英] How to add a side-navigation in polymer

查看:147
本文介绍了如何在聚合物中添加侧导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想添加一个像这样的侧面导航到我身边:




但是我不能在 polymer 中找到这个方法。唯一可能的是纸张 - 抽屉面板,但这是所有时间打开的...



我的工作纸抽屉面板示例: https://www.sese7.de/polymer/ p>



有没有人知道如何用聚合物或者 https://customelements.io/



预先致谢)

解决方案

尝试将 forceNarrow 属性设置为true。



是paper-drawer-panel API文档: https://元素。 polymer-project.org/elements/paper-drawer-panel


forceNarrow



布尔值

默认值:false

如果为true,忽略responsiv eWidth设置并强制缩小布局。


I want to add a side navigation like this to my side:

https://www.google.com/design/spec/material-design/introduction.html

There should be a menu button and a sidenav opens:

But i cant find this method in polymer. The only possibility is the paper-drawer-panel but this is opend all the time...

My working paper-drawer-panel example: https://www.sese7.de/polymer/


Does anybody has an idea how to do this with polymer or maybe with https://customelements.io/

Thanks in advance ;)

解决方案

Try setting the forceNarrow attribute to true.

Below is the documentation from the paper-drawer-panel api docs: https://elements.polymer-project.org/elements/paper-drawer-panel

forceNarrow

Boolean

default: false

If true, ignore responsiveWidth setting and force the narrow layout.

这篇关于如何在聚合物中添加侧导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆