Skip to content

Instantly share code, notes, and snippets.

View reygreen1's full-sized avatar
🖨️

RayGuo reygreen1

🖨️
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<button id="btn">click</button>
<script id="jsbin-javascript">
@reygreen1
reygreen1 / drawCircleProgress.markdown
Last active September 8, 2015 07:12
drawCircleProgress
@reygreen1
reygreen1 / dabblet.css
Created February 3, 2015 07:28
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@reygreen1
reygreen1 / dabblet.css
Created December 24, 2014 09:02
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@reygreen1
reygreen1 / dabblet.css
Created December 24, 2014 08:59
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@reygreen1
reygreen1 / dabblet.css
Created December 24, 2014 08:58
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@reygreen1
reygreen1 / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@reygreen1
reygreen1 / node中常用的全局对象.md
Last active May 20, 2019 05:20
对node中全局对象的一些整理

##全局对象(global)

__dirname:当前文件所在目录的绝对路径

__filename:当前文件的绝对路径

console:输出信息

  1. console.log():打印日志信息
  2. console.info():打印相关信息

##移动端webapp开发的触摸事件

###1.触摸事件

  • touchstart:当手指触摸屏幕时触发;即使已经有一个手指放在了屏幕上也会触发。

  • touchmove:当手指在屏幕上滑动时连续的触发。在这个事件发生期间,调用preventDefault()可阻止滚动。

  • touchend:当手指从屏幕上移开时触发。