<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>Title</title>
<style>
body{
margin: 0;
padding: 0;
}
.box{
width: 200px;
height: 200px;
background: pink;
float: left;
}
</style>
</head>
<body>
<!--
解释touch:
1. touch是移动端的触摸事件 而且是一组事件
2. touchstart 当手指触摸屏幕的时候触发
3. touchmove 当手指在屏幕来回的滑动时候触发
4. touchend 当手指离开屏幕的时候触发
5. touchcancel 当被迫终止滑动的时候触发(来电,弹消息)
移动端touch触摸效果原生js,获取触摸坐标
最新推荐文章于 2023-04-26 11:49:22 发布
![](https://img-home.csdnimg.cn/images/20240611030827.png)