javascript - 使用 "opacityDecayVelocity"属性配置 paper-ripple

标签 javascript polymer-2.x paper-elements

paper 波纹动画设置的默认时间为 0.8 秒,使过渡看起来更慢。 尝试通过以下方式更改值:

<paper-ripple opacityDecayVelocity ="1.0"></paper-ripple> 

添加 $ 作为其属性

<paper-ripple opacityDecayVelocity$ ="1.0"></paper-ripple>  

似乎都不起作用。请建议一种配置属性值的方法。

最佳答案

属性名称应为opacity-decay-velocity

<paper-ripple opacity-decay-velocity="1.0" ></paper-ripple>

参见Polymer Properties

Attribute names with dashes are converted to camelCase property names by capitalizing the character following each dash, then removing the dashes. For example, the attribute first-name maps to firstName. The same mappings happen in reverse when converting property names to attribute names

关于javascript - 使用 "opacityDecayVelocity"属性配置 paper-ripple,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51835062/

相关文章:

javascript - 浏览器内的Node JS fs模块

javascript - polymer 2.0 : why do we need an anonymous function when imperatively adding listener

javascript - querySelector 在 Polymer 2 的 Shadow DOM 中不起作用

javascript - 使用 JSON 格式的 Node.JS 从 MySQL 中检索数据

javascript - 我的背景颜色没有随 javascript 改变

polymer-2.x - Chrome 聚合物3 IIS中的相对路径

dart - 标签内的Google Dart页面

javascript - 纸抽屉面板默认为窄

javascript - 如何访问 D3.js 版本 4 中的节点 x 和 y?