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>
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/