gpt4 book ai didi

polymer - 默认隐藏 paper-header-panel

转载 作者:行者123 更新时间:2023-12-01 09:11:43 26 4
gpt4 key购买 nike

我正在玩弄 Polymer 项目,想创建一个类似于 Google Play 音乐的布局 (https://play.google.com/music)。

如何默认隐藏抽屉并显示图标?基本上应该强制纸抽屉面板的小屏幕行为。如何创建类似于 Play Music 的应用工具栏?

<body unresolved class="fullbleed layout vertical">
<span id="browser-sync-binding"></span>
<template is="dom-bind" id="app">

<paper-drawer-panel responsiveWidth="9999px">

<paper-header-panel drawer>
<paper-toolbar>
<div>Application</div>
</paper-toolbar>
<div>Drawer content...</div>
</paper-header-panel>

<paper-header-panel main>
<paper-toolbar>
<paper-icon-button icon="menu" paper-drawer-toggle></paper-icon-button>
<div>Title</div>
</paper-toolbar>
<div>Main content...</div>
</paper-header-panel>

</paper-drawer-panel>

</template>
</body>

最佳答案

嗯……force-narrow 怎么样?

<paper-header-panel force-narrow>
...
</paper-header-panel>

如“paper-header-panel.html”中所述:

    /**
* If true, ignore `responsiveWidth` setting and force the narrow layout.
*/
forceNarrow: {
type: Boolean,
value: false
},

关于polymer - 默认隐藏 paper-header-panel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30906774/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com