Wie fix einen header auf scroll

Erstelle ich einen header, einmal gescrollt werden, um eine bestimmte Menge von Pixeln, es fixiert und bleibt an Ort und Stelle.

Kann ich das einfach mit css und html oder muss ich das jquery auch?

Habe ich eine demo, so dass Sie verstehen können. Jede Hilfe würde groß sein!

http://jsfiddle.net/gxRC9/4/

body{
    margin:0px;
    padding:0px;
}
.clear{
    clear:both;
}
.container{
    height:2000px;
}
.cover-photo-container{
width:700px;
height: 348px;
margin-bottom: 20px;
background-color:red;
}

.small-box{
    width:163px;
    height:100px;
    border:1px solid blue;
    float:left;
}

.sticky-header{
    width:700px;
    height:50px;
    background:orange;
    postion:fixed;
}

InformationsquelleAutor der Frage Paul Designer | 2013-10-03

Schreibe einen Kommentar