【问题标题】:Polymer how to change Toolbar text size on scroll聚合物如何在滚动时更改工具栏文本大小
【发布时间】:2015-01-24 19:17:22
【问题描述】:

我正在为我的网站使用 Polymer,并将标题面板的 flex 模式设置为“Waterfall Tall”。我想达到类似这样的效果:

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

也就是说,当用户位于页面顶部时,文本会变大,滚动时会变小。 我如何做到这一点?

谢谢!

【问题讨论】:

    标签: css polymer android-toolbar


    【解决方案1】:

    添加到:host ::content header h1

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

    或添加到:

    h1 {
          -webkit-transform: none !important;
          transform: none !important;
    }
    

    【讨论】:

    • 这不起作用。这不会改变文本大小,甚至不会在滚动时折叠标题。
    【解决方案2】:

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

    【讨论】:

      猜你喜欢
      • 2015-04-13
      • 1970-01-01
      • 1970-01-01
      • 2022-08-12
      • 2020-03-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多