css active属性手机端不支持,实现按钮效果
指定元素添加touchstart事件
$('.prize-btn').on('touchstart',function(){
//...空函数即可
});或body上添加touchstart事件
document.body.addEventListener('touchstart',function(){
//...空函数即可
});实现按钮弹按下弹起效果
.prize .prize-btn .box{
cursor:pointer;
}
.prize .prize-btn .box:active{
transform:scale(0.97);
}