<html>
<head>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width , initial-scale=1 , maximum-scale=1 , user-scalable=no”>
<style>
body{background-color:#222;}
.spot{position:absolute; width:70px; height:70px; border-radius:35px; box-shadow:0px 0px 40px #fff; background-color:#fff; opacity:.7;}
</style>
</head>
<body>
<script>
var spots = {} , touches , timer;
<head>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width , initial-scale=1 , maximum-scale=1 , user-scalable=no”>
<style>
body{background-color:#222;}
.spot{position:absolute; width:70px; height:70px; border-radius:35px; box-shadow:0px 0px 40px #fff; background-color:#fff; opacity:.7;}
</style>
</head>
<body>
<script>
var spots = {} , touches , timer;
document.addEventListener(‘touchstart’,function(e){
e.preventDefault();
[].forEach.call(e.targetTouches,function(touch){
//对每一根触摸在屏幕上的手指都生成一个元素,并且用touch.identifier作为该元素的唯一标识,触摸结束后清除引用的元素
if(spots[t
版权声明:本文为kongjunchao159原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。