這裏是我的codepen:http://codepen.io/Chiz/pen/MaBwBb按鈕不可點擊?
當你點擊按鈕,一般按鈕會給被「按下」視覺反饋,但在這種情況下,沒有這樣的事情發生。這就像按鈕已被禁用。爲什麼是這樣?
$(document).ready(function() {
$("#fullpage").fullpage({
verticalCentered: false,
resize: true,
scrollingSpeed: 700,
css3: true,
easing: "easeOutBounce"
});
});
* {
box-sizing: border-box;
}
html,
body {
height: 100%;
}
div.container {
position: relative;
}
#fullpage {
width: 100%;
height: 100%;
background-color: #ffe4b3;
}
#header {
width: 100%;
height: 70px;
line-height: 70px;
background-color: #343434;
}
#header ul {
list-style-type: none;
color: white;
margin: 0;
height: 100%;
}
#header ul li {
display: inline-block;
float: right;
padding: 0rem 2rem;
width: 10rem;
height: 100%;
text-align: center;
font-size: 1rem;
}
#header ul li a {
color: white;
text-decoration: none;
}
#footer {
width: 100%;
height: 50px;
position: absolute;
bottom: 0px;
background-color: black;
}
.slide {
font-size: 1.5rem;
}
.button-container {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.prev,
.next {
width: 7rem;
height: 3rem;
font-size: 1rem;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<script src="https:https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<script src="https:https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.7.4/jquery.fullPage.min.js"></script>
<script src="https:https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.7.4/vendors/jquery.slimscroll.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.7.4/jquery.fullPage.min.css" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css" />
<div id="fullpage">
<div class="section active container">
<div id="header">
<ul>
<li><a href="">Link 1</a>
</li>
<li><a href="">Link 2</a>
</li>
<li><a href="">Link 3</a>
</li>
</ul>
</div>
<div class="slide">Slide1</div>
<div class="slide">Slide2</div>
<div class="slide">Slide3</div>
<div class="button-container">
<button type="button" class="prev">Prev</button>
<button type="button" class="next">Next</button>
</div>
<div id="footer"></div>
</div>
</div>
它在chrome中工作您使用哪種瀏覽器? – guradio
它看起來像你的按鈕背後「。幻燈片」。添加「z-index:2;」到「.button-container」解決了這個問題。 – musse1
查看此演示http://codepen.io/anon/pen/YyjEmX –