在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):PolymerElements/paper-header-panel开源软件地址(OpenSource Url):https://github.com/PolymerElements/paper-header-panel开源编程语言(OpenSource Language):JavaScript 72.8%开源软件介绍(OpenSource Introduction):<paper-header-panel>This element has been deprecated in favor of app-layout.
Important: The ModesControls header and scrolling behavior. Options are
StylingTo change the shadow that shows up underneath the header:
To change the panel container:
To change the panel container in different modes:
The following custom properties and mixins are available for styling:
See: Documentation, Demo. UsageInstallation
In an html file<html>
<head>
<script type="module">
import '@polymer/paper-header-panel/paper-header-panel.js';
import '@polymer/paper-toolbar/paper-toolbar.js';
</script>
<style>
html, body {
margin: 0;
}
paper-header-panel {
height: 100vh;
}
</style>
</head>
<body>
<paper-header-panel>
<paper-toolbar slot="header">Header</paper-toolbar>
<div>Content goes here...</div>
</paper-header-panel>
</body>
</html> In a Polymer 3 elementimport {PolymerElement, html} from '@polymer/polymer';
import '@polymer/paper-header-panel/paper-header-panel.js';
import '@polymer/paper-toolbar/paper-toolbar.js';
class SampleElement extends PolymerElement {
static get template() {
return html`
<style>
paper-header-panel {
height: 100vh;
}
</style>
<paper-header-panel>
<paper-toolbar slot="header">Header</paper-toolbar>
<div>Content goes here...</div>
</paper-header-panel>
`;
}
}
customElements.define('sample-element', SampleElement); ContributingIf you want to send a PR to this element, here are the instructions for running the tests and demo locally: Installationgit clone https://github.com/PolymerElements/paper-header-panel
cd paper-header-panel
npm install
npm install -g polymer-cli Running the demo locallypolymer serve --npm
open http://127.0.0.1:<port>/demo/ Running the testspolymer test --npm |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论