根据API提示,cover-view 应该具备transform 和 opacity动画属性,但实际当中无法实现。
我设置了一个简单的view, 实现点击动画效果,原本应该同样适用于cover-view(在开发工具当中可以正常显示动画),但在真机测试当中点击后无任何效果
*.wxss
.button-one{ width: 200px; text-align: center; font-size: 16px; margin: 0 0 0 50px; outline: none; border-radius: 5px; color: white; background-color: #27ae60; padding: 10px 20px; user-select: none;}.button-one:active{ transform: translateY(5px); opacity: 0.8;} |
*.wxml
<cover-view class="button-one">Tap Me |
将cover-view替换成view可正常显示效果
