1. 程式人生 > >移動端ios下H5的:active樣式失效的解決方法

移動端ios下H5的:active樣式失效的解決方法

移動端 col tar true 函數 als lis add :active

在body上綁定一個touchstart事件,空函數就行:

1 document.body.addEventListener(‘touchstart‘, function(){}, false)

或者在body標簽上加上ontouchstart=""也可以:

<body ontouchstart="">

  

移動端ios下H5的:active樣式失效的解決方法