Skip to content

Instantly share code, notes, and snippets.

步天 maisui99

Block or report user

Report or block maisui99

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@maisui99
maisui99 / css-to-base64
Last active Aug 29, 2015
css images to base64 and fix ie6/7
View css-to-base64
/**
* Created with IntelliJ IDEA.
* @author: butian.wth
* @version: 1-0-0
* Date: 14-5-27
* Time: 下午5:23
*/
//new Buffer("Hello World").toString('base64')
@maisui99
maisui99 / shake
Created May 20, 2014
简单的摇一摇实现
View shake
if (typeof window.DeviceMotionEvent != 'undefined') {
// Shake sensitivity (a lower number is more)
var sensitivity = 20;
// Position variables
var x1 = 0, y1 = 0, z1 = 0, x2 = 0, y2 = 0, z2 = 0;
// Listen to motion events and update the position
window.addEventListener('devicemotion', function (e) {
x1 = e.accelerationIncludingGravity.x;
You can’t perform that action at this time.