0
everyone。 我正面臨我的滑塊問題。它完美地工作,但是當我刷新頁面的那一刻,我可以看到ms消失前我滑塊中的所有圖像。有沒有辦法確保刷新時,他們不會被看到?在滑塊中查看ms圖片
[Bootply範例] [1]
(在這個例子中也沒關係,但我真正的網頁上,有更大的延遲)
HTML
<div class="container">
<div class="col-md-7">
<div class="col-md-2">
<a href="#" class="control_next">>></a>
</div>
<div class="col-md-8">
<div id="slider">
<ul>
<li>SLIDE 1</li>
<li style="background: #aaa;">SLIDE 2</li>
<li>SLIDE 3</li>
<li style="background: #aaa;">SLIDE 4</li>
</ul>
</div>
</div>
<div class="col-md-2">
<a href="#" class="control_prev"><</a>
</div>
</div>
<div class="col-md-5">
</div>
</div>
css
/*此處使用的CSS w bootstrap.css後生病*/
.container{
background-color: green;
width: 1380px;
}
#slider {
position: relative;
overflow: hidden;
}
#slider ul {
position: relative;
margin: 0;
padding: 0;
}
#slider ul li {
position: relative;
display: block;
float: left;
margin: 0;
padding: 0;
width: 500px;
height: 300px;
background: #ccc;
text-align: center;
line-height: 300px;
}
a.control_prev, a.control_next {
position: absolute;
top: 40%;
z-index: 999;
display: block;
padding: 4% 3%;
width: auto;
height: auto;
background: #2a2a2a;
color: #fff;
text-decoration: none;
font-weight: 600;
font-size: 18px;
opacity: 0.8;
cursor: pointer;
}
a.control_prev:hover, a.control_next:hover {
opacity: 1;
-webkit-transition: all 0.2s ease;
}
a.control_prev {
border-radius: 0 2px 2px 0;
}
a.control_next {
right: 0;
border-radius: 2px 0 0 2px;
}