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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
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
/* Pounding heart animation */ | |
@keyframes pound { | |
to { transform: scale(1.4); } | |
} | |
.heart { | |
display: inline-block; | |
font-size: 150px; | |
color: #e00; |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/* -------------------------------------------------------------- | |
Universal Internet Explorer 6 stylesheet: | |
http://stuffandnonsense.co.uk/blog/about/universal_internet_explorer_6_css/ | |
Author: Andy Clarke | |
Web site: http://stuffandnonsense.co.uk | |
Web site: http://forabeautifulweb.com | |
Web site: http://transcending.com | |
Web site: http://hardboiledwebdesign.com | |
Twitter: http://twitter.com/malarkey |
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-user-select:none; /* Prevent copy paste for all elements except text fields */ | |
-webkit-tap-highlight-color:rgba(0, 0, 0, 0); /* set highlight color for user interaction */ | |
-moz-tap-highlight-color:rgba(0, 0, 0, 0); /* set highlight color for user interaction */ | |
-ms-touch-action:none; | |
-moz-user-select:-moz-none; | |
-webkit-touch-callout: none; /* prevent the popup menu on any links*/ | |
margin:0; | |
padding:0; | |
-webkit-box-sizing:border-box; |
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
//1) https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is | |
var isSame = Object.is(value1, value2); | |
//2) Fast and limited. | |
//The ORDER of the properties IS IMPORTANT | |
JSON.stringify(obj1) === JSON.stringify(obj2) ; | |
//3) Slow and more generic. | |
function deepCompare () { |
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
(function(){ | |
/** | |
* 功能:图片惰性加载。在需要图片惰性加载的页面底部载入。再将图片加上class=“lazy”。并将图片的真实地址放置在图片的自定义属性dataimg中。 | |
* @author haunghm | |
* @version 1.0.0 | |
* @dependencies jquery 或者 zepto | |
*/ | |
var lazyLoad = { | |
init: function() { |
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
.clearfix { | |
*zoom: 1; | |
&:before, | |
&:after { | |
display: table; | |
content: ""; | |
} | |
&:after { | |
clear: both; | |
} |
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
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers']) | |
.run(function(DB) { | |
DB.init(); | |
}); |
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
//https://github.com/hotoo/detector/blob/master/detector.js | |
var detector = {}; | |
var NA_VERSION = "-1"; | |
var win = this; | |
var external; | |
var re_msie = /\b(?:msie |ie |trident\/[0-9].*rv[ :])([0-9.]+)/; | |
var re_blackberry_10 = /\bbb10\b.+?\bversion\/([\d.]+)/; | |
var re_blackberry_6_7 = /\bblackberry\b.+\bversion\/([\d.]+)/; | |
var re_blackberry_4_5 = /\bblackberry\d+\/([\d.]+)/; |
OlderNewer