Skip to content

Instantly share code, notes, and snippets.

View zhishaofei3's full-sized avatar
🎯
Focusing

zhishaofei zhishaofei3

🎯
Focusing
  • 北京
View GitHub Profile
@zhishaofei3
zhishaofei3 / unlock.js
Created November 16, 2017 14:20 — forked from laziel/unlock.js
Unlock Web Audio in iOS 9 Safari
var ctx = null, usingWebAudio = true;
try {
if (typeof AudioContext !== 'undefined') {
ctx = new AudioContext();
} else if (typeof webkitAudioContext !== 'undefined') {
ctx = new webkitAudioContext();
} else {
usingWebAudio = false;
}
@zhishaofei3
zhishaofei3 / 0_reuse_code.js
Created August 5, 2016 07:12
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
@zhishaofei3
zhishaofei3 / dabblet.css
Created August 5, 2016 04:44 — forked from csssecrets/dabblet.css
Typing animation
/**
* Typing animation
*/
@keyframes typing {
from { width: 0 }
}
@keyframes caret {
50% { border-right-color: transparent; }
@zhishaofei3
zhishaofei3 / dabblet.css
Created July 26, 2016 07:07 — forked from csssecrets/dabblet.css
Marching ants border
/**
* Marching ants border
*/
@keyframes ants { to { background-position: 100% 100% } }
div {
padding: 1em;
border: 1px solid transparent;
background: linear-gradient(white, white) padding-box,
@zhishaofei3
zhishaofei3 / dabblet.css
Created July 26, 2016 06:56 — forked from csssecrets/dabblet.css
Vintage envelope themed border via border-image
/**
* Vintage envelope themed border via border-image
*/
div {
padding: 1em;
border: 16px solid transparent;
border-image: 16 repeating-linear-gradient(-45deg, red 0, red 1em, transparent 0, transparent 2em,
#58a 0, #58a 3em, transparent 0, transparent 4em);