Html
    Css
    Js

    
                        
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video {
	margin:0;
	padding:0;
	border:0;
	font-size:100%;
	font:inherit;
	vertical-align:baseline
}
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
	display:block
}
body {
	line-height:1
}
ol,ul {
	list-style:none
}
blockquote,q {
	quotes:none
}
blockquote:before,blockquote:after,q:before,q:after {
	content:'';
	content:none
}
table {
	border-collapse:collapse;
	border-spacing:0
}
#wrapper {
	width:100%;
	position:relative;
}
#container {
	width:100%;
	position:relative;
	background:#303030;
	z-index:-5;
}
header.home {
	max-width:760px;
	position:relative;
	margin:0 auto;
	text-align:center;
}
header.home img {
	max-width:300px;
	margin:0 auto;
	position:relative;
	text-align:center;
}
.home-title {
	font-family:"coquette";
	font-size:3em;
	color:white;
	margin:10px 0px 20px 0px;
}
.home-desc {
	font-family:"coquette";
	font-size:1.8em;
	color:white;
	margin:0px 0px 20px 0px;
	line-height:1.3em;
}
#top_intro {
	width:100%;
}
.le-background {
	position:fixed;
	top:0px;
	left:0;
	bottom:0;
	right:0;
	width:100%;
	z-index:-2;
	opacity:0.6;
	background:#303030;
	background-size:cover !important;
	background-position:center;
	background-repeat:no-repeat no-repeat;
}
.blurred {
	opacity:0;
}
#mainMenuBar {
	width:100%;
	background-color:white;
	z-index:100;
}
#mainMenuBar ul {
	margin:0 auto;
	text-align:center;
	position:relative;
	padding:20px;
	border:1px solid black;
}
#mainMenuBar li {
	display:inline-block;
	color:black;
	margin-left:30px;
	font-size:1.2em;
	font-family:"proxima-nova";
	font-weight:100;
}
#content {
	width:100%;
	position:relative;
	background-color:white;
	padding-top:20px;
}
#content p {
	font-size:1.2em;
	font-family:"proxima-nova";
	font-weight:100;
	max-width:640px;
	margin:0 auto;
	line-height:1.4em;
	padding:10px 0px 10px 0px;
}
.stick {
	position:fixed;
	top:0;
}
.home {
	background:#d7c4b4;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.11.3
 立即下载

jQuery滚动导航定位

当导航栏滑到定顶部时固定定位

0