This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.target { | |
-webkit-appearance: menulist-button; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a:not([href]) { | |
/* Styles for anchors without href */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{}.toString.call(arg); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (window.navigator.standalone) { | |
// The app is running in standalone mode. | |
} | |
// or | |
if (window.navigator.standalone && navigator.userAgent.match( /like Mac OS X/i )) { | |
// added to homescreen by mobile Safari | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.time('a'); | |
// execute some JavaScript | |
console.timeEnd('a'); | |
// the result showed in console is the duration that block of JavaScript spent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _regex = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/; | |
var videoUrl = 'http://www.youtube.com/watch?v=D1GmL_mvmwY&feature=g-high-u'; | |
// there you go~ | |
var youtubeId = videoUrl.match(_regex)[7]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* draw any selected text yellow on red background */ | |
::-moz-selection { color: gold; background: red; } | |
::selection { color: gold; background: red; } | |
/* draw selected text in a paragraph white on black */ | |
p::-moz-selection { color: white; background: black; } | |
p::selection { color: white; background: black; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.scrolls { | |
overflow-x: scroll; | |
overflow-y: hidden; | |
height: 80px; | |
white-space: nowrap; | |
} | |
.imageDiv img { | |
display: inline-block; | |
*display:inline;/* For IE7*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-webkit-tap-highlight-color: #f00; |
OlderNewer