2.移动端基础事件---touch事件
来源:互联网 发布:水滴源码 编辑:程序博客网 时间:2024/05/16 18:06
viewport设置
<meta name="viewport" content="width=device-width,user-scalable=no" charset="UTF-8">
背景颜色由粉色变成蓝色
touch事件,在chrome的模拟器下,部分版本 通过on 的方式来添加事件无效.
<style> #box{ width: 100px; height: 100px; background:pink; } </style> <script> window.onload = function(){ var box = document.querySelector("#box"); // box.style.background = "blue"; } </script>
touchStart
touchstart 手指触摸到 屏幕 ==mousedown
box.ontouchstart = function(){ this.style.background="red"; }
touchend
touchend 手指抬起的 时候 == mouseup
box.ontouchend = function(){ this.style.background="orange";
touchmove
touchend 手指抬起的 时候 == mousemove
this.style.background="black";19.36s
阅读全文
0 0
- 2.移动端基础事件---touch事件
- 移动端touch事件
- 移动端的touch事件
- 移动端touch事件影响click事件
- 移动web 移动端Touch事件
- 移动端滑屏 touch事件
- 移动端事件基础
- 移动端touch事件获取clientX, clientY
- 移动端开发 原生touch事件使用
- 移动端基本touch事件实现
- 详解移动端的Touch事件
- 深入理解移动端touch事件
- 移动端的touch事件(二)
- html5移动端触摸事件touch
- 移动端web开发---Touch事件详解
- 自行封装移动端touch事件
- 简易封装移动端touch事件
- 移动端touch事件穿透解决办法
- bzoj1024 [SCOI2009]生日快乐
- Python 线程调度(Condition),线程同步
- 数组实现线性表的删除
- BZOJ1084 最大子矩阵 [DP]
- ros学习笔记--小乌龟运动
- 2.移动端基础事件---touch事件
- 【DP】【cofun1900】找硬币
- (1)判断是否为完全二叉树 (2)求二叉树的高度
- 编写一个HttpRequest类的五步法
- LeetCode第六周
- PIGS POJ
- NKOJ 3798 有趣的数列 (卡特兰数+线性筛)
- python环境搭建-windows系统
- spring学习笔记