聚合物如何在滚动时更改工具栏文本大小



我正在为我的网站使用聚合物,标题面板弯曲模式设置为"瀑布高"。我想达到类似的效果:

https://www.polymer-project.org/docs/elements/icons.html

也就是说,当用户位于页面顶部时,文本会变大,并且在滚动时会变小。我该如何实现这一点?

谢谢!

添加到 :host ::content header h1

:host ::content header h1 {
  -webkit-transform: none !important;
  transform: none !important;
}

或添加到:

h1 {
      -webkit-transform: none !important;
      transform: none !important;
}
好的,

我找到了一种相对简单的方法来做到这一点。它涉及使用给定的此处https://www.polymer-project.org/docs/elements/core-elements.html#core-scroll-header-panel

最新更新