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
.hide-text { | |
text-indent: 100%; | |
white-space: nowrap; | |
overflow: hidden; | |
} |
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
img { | |
background: url(loader.gif) no−repeat 50% 50%; | |
} |
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
/* shorthand notation for font properties */ | |
font: [font-style] [font-variant] [font-weight] [font-size]/[line-height] [font-family]; |
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
.animate { | |
/* name duration delay iteration-count direction fill-mode timing-function */ | |
animation: test 1s 2s 3 alternate backwards ease; | |
} |
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
.blink { | |
opacity: 1; | |
animation: blink 0.5s 0 infinite alternate forwards ease-in; | |
} | |
@keyframes blink { | |
from { | |
opacity: 1; | |
} | |
to { |
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
/*Smartphones (portrait and landscape) ----------- */ | |
@media only screen | |
and (min-width : 320px) | |
and (max-width : 480px) { | |
/* Styles */ | |
} | |
/* Smartphones (landscape) ----------- */ | |
@media only screen | |
and (min-width : 321px) { |
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
//remove tap-highlight-color from all in css | |
// a[data-active] { /* here are your styles */ } | |
element.addEventListener("touchstart", function (event) { | |
if (event.target.setAttribute) { | |
event.target.setAttribute("data-active", ""); | |
} | |
}, true); | |
element.addEventListener("touchend", function (event) { | |
if (event.target.removeAttribute) { |
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 CSS */ | |
@media all and (min-width: 45em) { | |
body:after { | |
content: 'widescreen'; | |
display: none; | |
} | |
} | |
// THE JS | |
var size = window.getComputedStyle(document.body,':after').getPropertyValue('content'); |
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 isTouch = function() { | |
return !!('ontouchstart' in window) ? true : false; | |
} | |
if(isTouch()) { | |
var fireEvent = ['touchstart','touchend']; | |
} else { | |
var fireEvent = ['mousedown','mouseup']; | |
} | |
elem.addEventListener(fireEvent[0],function(){ |
OlderNewer