Framework7 - Touch Ripple

描述

Touch Ripple是仅在Framework7材质主题中受支持的效果.默认情况下,它在材质主题中启用,您可以使用 materialRipple:false 参数禁用它.

Ripple Elements

你可以启用ripple元素来匹配一些CSS选择器,例如 :

  • ripple

  • a.link

  • a.item-link

  • .button

  • .tab-link

  • .label-radio

  • .label-checkbox等.

这些在 materialRippleElements 参数中指定.您需要启用触摸波纹,将元素的选择器添加到 materialRippleElements 参数以使用波纹效果,或者只使用波纹类.

波纹波颜色

通过添加纹波 -  [颜色] 元素的类.

例如 :

<a href = "#" class = "button ripple-orange">Ripple Button</a>

或者您可以使用CSS定义波纹波颜色,如下所示 :

.button .ripple-wave {
   background-color: #FFFF00;
}

禁用纹波元素

您可以通过添加

<a href = "#" class = "button no-ripple">Ripple Button</a>