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
/* ============================================================================= | |
CSS Declarations | |
========================================================================== */ | |
/* ==|== The Standard Way =================================================== */ | |
.foo::before { | |
/* ...css rules... */ | |
} |
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
// Array | |
$array = array(1, 2, 3, 4, 5, 6, 7, 8, 9); | |
foreach($array as $key => $value) { | |
if(($key%2)===0 && $key > 0) { | |
echo $value; | |
} | |
} |
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
@media only screen and (min-width: 320px) { | |
/* Small screen, non-retina */ | |
} | |
@media | |
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px), |
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
/* Modernizr load */ | |
Modernizr.load({ | |
test : Modernizr.input.placeholder, | |
nope : './js/ext/placeholderfix.js' | |
}); |
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() { | |
if (navigator.userAgent.match(/IEMobile\/10\.0/)) { | |
var msViewportStyle = document.createElement("style"); | |
msViewportStyle.appendChild( | |
document.createTextNode("@-ms-viewport{width:auto!important}") | |
); | |
document.getElementsByTagName("head")[0].appendChild(msViewportStyle); | |
} | |
})(); |
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
/* this CSS create a minimum width of 750px: */ | |
#wrapper { | |
min-width: 750px; | |
width:expression(document.body.clientWidth < 750? "750px": "auto" ); | |
} | |
/* this CSS create a minimum width of 750px and a max-width of 1220px */ | |
#wrapper { | |
min-width: 750px; | |
max-width: 1220px; |
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
/** | |
* Author: @joostkiens | |
* Licensed under the MIT license | |
*/ | |
@mixin hr-image($image, $width, $height) { | |
@media print, | |
(-webkit-min-device-pixel-ratio: 1.25), | |
(-o-min-device-pixel-ratio: 5/4), | |
(min-resolution: 120dpi) { | |
background-image: url($image); |
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 scrollToEle($ele) { | |
var x = $($ele).offset().top; | |
$('html,body').animate({scrollTop: x}, 500); | |
} | |
$(document).ready(function(){ | |
scrollToEle('#test-div'); | |
}); |
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
/* | |
Bsp CSS.: | |
ul, ol { color: red; } | |
span.text { color: black; } | |
*/ | |
$(document).ready(function(){ | |
/* content ist hier der Bereich für die Texte usw. */ | |
$('#content ul li').each(function(i, e) { | |
$(e).contents().wrap('<span class="text"></span>') |
OlderNewer