Skip to content

Instantly share code, notes, and snippets.

View seoagentur-hamburg's full-sized avatar

Andreas Hecht seoagentur-hamburg

View GitHub Profile
@seoagentur-hamburg
seoagentur-hamburg / gist:5374371
Created April 12, 2013 19:11
Fullpage Background Image mit reinem CSS3
html {
background: url(fluss.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
@seoagentur-hamburg
seoagentur-hamburg / gist:5379190
Created April 13, 2013 16:58
HTML for fullpage background image, insert right after <body>.
<body>
<div>
<img id="background-img" src="fluss.jpg" alt="" /> <!-- Das eingebundene Hintergrundbild -->
<div>
<!-- Der Inhalt der Seite folgt hier -->
</body>
@seoagentur-hamburg
seoagentur-hamburg / gist:5379200
Created April 13, 2013 17:01
The CSS for fullpage background images
img.hintergrundbild {
min-height: 100%; /* Diese zwei Zeilen setzen die Regeln um den Hintergrund zu füllen */
min-width: 1024px;
width: 100%; /* Die Regeln, welche für die Skalierung sorgen */
height: auto;
position: fixed; /* Die Positionierung */
top: 0;
left: 0;
@seoagentur-hamburg
seoagentur-hamburg / gist:5397697
Created April 16, 2013 17:14
Die richtige Art, um is_front_page() und is_home() korrekt zu nutzen.
<?php
if ( is_front_page() && is_home() ){
// Default homepage
} elseif ( is_front_page()){
//Static homepage
} elseif ( is_home()){
//Blog page
} else {
//everything else
@seoagentur-hamburg
seoagentur-hamburg / gist:5413008
Last active May 3, 2017 11:53
HTML für vollflächige Hintergrundbilder Teil 2
<div id="bg">
<img src="images/bg.jpg" alt="">
</div>
@seoagentur-hamburg
seoagentur-hamburg / gist:5413038
Last active December 16, 2015 09:29
Das CSS für das vollflächige Hintergrundbild Teil 2
#bg {
position: fixed;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
}
#bg img {
position: absolute;
top: 0;
@seoagentur-hamburg
seoagentur-hamburg / gist:5413219
Created April 18, 2013 14:36
CSS für vollflächige Hintergrundbilder mit jQuery
#bg { position: fixed; top: 0; left: 0; }
.bgwidth { width: 100%; }
.bgheight { height: 100%; }
@seoagentur-hamburg
seoagentur-hamburg / gist:5413240
Created April 18, 2013 14:38
Das jQuery für die Lösung vollflächige Hintergrundbilder 3
$(window).load(function() {
var theWindow = $(window),
$bg = $("#bg"),
aspectRatio = $bg.width() / $bg.height();
function resizeBg() {
if ( (theWindow.width() / theWindow.height()) < aspectRatio ) {
$bg
@seoagentur-hamburg
seoagentur-hamburg / gist:5426545
Created April 20, 2013 16:35
Get jQuery latetest
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
@seoagentur-hamburg
seoagentur-hamburg / gist:5426668
Created April 20, 2013 17:05
Das zur korrekten Darstellung des Buttons nötige CSS
a#kontakt{
position: absolute;
top: 205px;
left: 0;
background: url(feedback_button.png) no-repeat;
background-position: 90% 100%;
width: 35px;
height: 109px;
border:1px solid #999;