我的屏幕上方有一個固定的導航欄,但是當我向下滾動flexslider滾動到頂部而不是後面時,我嘗試更改每個容器的z-索引但無濟於事,有人可以幫助一個CSS業餘?Flexslider z-index頂部定位
@charset "utf-8";
/* CSS Document */
#navigation {
position: fixed;
top: 0;
width: 100%;
color: #ffffff;
height: 35px;
background-color: rgba(1, 1, 1, 0.8);
color: rgba(1, 1, 1, 0.8);
padding-top: 15px;
z-index = 1000;
}
#navigation a {
font-size: 14px;
padding-left: 15px;
padding-right: 15px;
color: white;
text-decoration: none;
}
#navigation a:hover {
color: grey;
}
#logo {
\t float: left;
}
#container {
postion: relative;
width: 960px;
margin: auto;
padding: 0;
color: #ffffff;
height: 35px;
text-align: center;
}
#content{
\t padding: 50px;
\t width:100%
\t margin: auto;
}
/* Browser Resets */
.flex-container a:active,
.flexslider a:active,
.flex-container a:focus,
.flexslider a:focus { outline: none; }
.slides,
.flex-control-nav,
.flex-direction-nav {
\t margin: 0;
\t padding: 0;
\t list-style: none;
}
.flexslider a img { outline: none; border: none; }
.flexslider {
\t margin: 0;
\t padding: 0;
}
/* Hide the slides before the JS is loaded. Avoids image jumping */
.flexslider .slides > li {
\t display: none;
\t -webkit-backface-visibility: hidden;
}
.flexslider .slides img {
\t width: 100%;
\t display: block;
\t -webkit-border-radius: 2px;
\t -moz-border-radius: 2px;
\t border-radius: 2px;
}
/* Clearfix for the .slides element */
.slides:after {
\t content: ".";
\t display: block;
\t clear: both;
\t visibility: hidden;
\t line-height: 0;
\t height: 0;
}
html[xmlns] .slides { display: block; }
* html .slides { height: 1%; }
/* Theme Styles */
.flexslider {
\t position: relative;
\t zoom: 1;
\t padding: 10px;
\t background: #ffffff;
\t -webkit-border-radius: 3px;
\t -moz-border-radius: 3px;
\t border-radius: 3px;
\t -webkit-box-shadow: 0px 1px 1px rgba(0,0,0, .2);
\t -moz-box-shadow: 0px 1px 1px rgba(0,0,0, .2);
\t box-shadow: 0px 1px 1px rgba(0,0,0, .2);
\t z-index = 5;
}
/* Edit it if you want */
.flex-container {
\t min-width: 150px;
\t max-width: 960px;
\t margin:auto;
\t z-index= 5;
}
.flexslider .slides { zoom: 1; }
/* Direction Nav */
.flex-direction-nav a {
\t display: block;
\t position: absolute;
\t margin: -17px 0 0 0;
\t width: 35px;
\t height: 35px;
\t top: 50%;
\t cursor: pointer;
\t text-indent: -9999px;
\t z-index: 5;
\t background-color: #82d344;
\t background-image: -webkit-gradient(linear, left top, left bottom, from(#82d344), to(#51af34));
\t background-image: -webkit-linear-gradient(top, #82d344, #51af34);
\t background-image: -moz-linear-gradient(top, #82d344, #51af34);
\t background-image: -o-linear-gradient(top, #82d344, #51af34);
\t background-image: linear-gradient(to bottom, #82d344, #51af34);
}
.flex-direction-nav a:before {
\t display: block;
\t position: absolute;
\t content: '';
\t width: 9px;
\t height: 13px;
\t top: 11px;
\t left: 11px;
\t background: url(images/arrows.png) no-repeat;
}
.flex-direction-nav a:after {
\t display: block;
\t position: absolute;
\t content: '';
\t width: 0;
\t height: 0;
\t top: 35px;
}
.flex-direction-nav .flex-next {
\t right: -5px;
\t -webkit-border-radius: 3px 0 0 3px;
\t -moz-border-radius: 3px 0 0 3px;
\t border-radius: 3px 0 0 3px;
}
.flex-direction-nav .flex-prev {
\t left: -5px;
\t -webkit-border-radius: 0 3px 3px 0;
\t -moz-border-radius: 0 3px 3px 0;
\t border-radius: 0 3px 3px 0;
}
.flex-direction-nav .flex-next:before { background-position: -9px 0; left: 15px; }
.flex-direction-nav .flex-prev:before { background-position: 0 0; }
.flex-direction-nav .flex-next:after {
\t right: 0;
\t border-bottom: 5px solid transparent;
\t border-left: 5px solid #31611e;
}
.flex-direction-nav .flex-prev:after {
\t left: 0;
\t border-bottom: 5px solid transparent;
\t border-right: 5px solid #31611e;
}
/* Control Nav */
.flexslider .flex-control-nav {
\t position: absolute;
\t width: 100%;
\t bottom: -40px;
\t text-align: center;
\t margin: 0 0 0 -10px;
}
.flex-control-nav li {
\t display: inline-block;
\t zoom: 1;
}
.flex-control-paging li a {
\t display: block;
\t cursor: pointer;
\t text-indent: -9999px;
\t width: 12px;
\t height: 12px;
\t margin: 0 3px;
\t background-color: #b6b6b6 \9;
\t -webkit-border-radius: 12px;
\t -moz-border-radius: 12px;
\t border-radius: 12px;
\t -webkit-box-shadow: inset 0 0 0 2px #b6b6b6;
\t -moz-box-shadow: inset 0 0 0 2px #b6b6b6;
\t box-shadow: inset 0 0 0 2px #b6b6b6;
}
.flex-control-paging li a.flex-active {
\t background-color: #82d344;
\t background-image: -webkit-gradient(linear, left top, left bottom, from(#82d344), to(#51af34));
\t background-image: -webkit-linear-gradient(top, #82d344, #51af34);
\t background-image: -moz-linear-gradient(top, #82d344, #51af34);
\t background-image: -o-linear-gradient(top, #82d344, #51af34);
\t background-image: linear-gradient(to bottom, #82d344, #51af34);
\t -webkit-box-shadow: none;
\t -moz-box-shadow: none;
\t box-shadow: none;
}
/* Captions */
.flexslider .slides p {
\t display: block;
\t position: absolute;
\t left: 0;
\t bottom: 0;
\t padding: 0 5px;
\t margin: 0;
\t font-family: Helvetica, Arial, sans-serif;
\t font-size: 12px;
\t font-weight: bold;
\t text-transform: uppercase;
\t line-height: 20px;
\t color: white;
\t background-color: #222222;
\t background: rgba(0,0,0, .9);
\t -webkit-border-radius: 2px;
\t -moz-border-radius: 2px;
\t border-radius: 2px;
}
#about {
\t
\t height: 2000px;
\t width: 960px;
\t position: relative;
\t margin: auto;
}
body {
\t padding: 0;
\t margin: 0;
\t display: block;
\t height: 100%;
\t vertical-align: baseline;
}
你可以發佈必要的HTML嗎?這可能會更容易幫助你。 –