亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

我的代碼設置了slide 但是沒有用,而且paddingTop 的屬性也沒有用求助

<!DOCTYPE?html>
<html?lang="en">
<head>
????<meta?charset="UTF-8">
????<meta?name="viewport"?content="width=device-width,initial-scale=1,user-scalable=no"?/>
????<meta?name="description"?content="通過class做選擇器的!">
????<title>fullpage?的簡單頁面</title>

????<link?>
????<style>
????????body{
????????????color:?#ffffff;
????????????text-align:?center;
????????????font-size:?24px;
????????}
????????.section1{
????????????background-color:?antiquewhite;
????????}
????????.section2{
????????????background-color:gold;
????????}
????????.section3{
????????????background-color:?yellowgreen;
????????}
????????.section4{
????????????background-color:?lightseagreen;
????????}
????</style>
</head>
<body>
????<div?id="fullpage">
????????<div?class="section?section1"><h1>這是第一屏</h1></div>
????????<div?class="section?section2">
????????????<div?class="slide"?data-anchor="slide1">?Slide?1?</div>
????????????<div?class="slide"?data-anchor="slide2">?Slide?2?</div>
????????????<div?class="slide"?data-anchor="slide3">?Slide?3?</div>
????????????<div?class="slide"?data-anchor="slide4">?Slide?4?</div>
????????</div>
????????<div?class="section?section3"><h1>這是第三屏</h1></div>
????????<div?class="section?section4"><h1>這是第四屏</h1></div>
????</div>
</body>
<script?src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script?src="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.7.4/jquery.fullPage.min.js"?charset="utf-8"></script>
<script?src="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.7.4/vendors/jquery.easings.min.js"?charset="utf-8"></script>
<script?src="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.7.4/vendors/jquery.slimscroll.min.js"?charset="utf-8"></script>
<script>
????$(document).ready(function(){
???????$('#fullpage').fullpage({
???????????slideSelector:'.slide',
???????????paddingTop:0,
???????????loopTop:true,
???????????loopBottom:true
?});
????});
</script>
</html>


正在回答

1 回答

1.你的css引入缺少了rel和type,其中rel="stylesheet"是必須聲明的
2.要顯示項目導航slide必須配置參數navigation:true,并沒有slideSelector:'.slide'這個參數屬性
3.paddingTop是某個屏幕下里面的文字或者是其他東西與頂部的距離,為字符串寫的時候得帶上引號


0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
FullPage.js全屏滾動插件
  • 參與學習       43807    人
  • 解答問題       217    個

基于jQuery的全屏滾動效果插件,讓翻頁顯得格外的高端大氣上檔次

進入課程

我的代碼設置了slide 但是沒有用,而且paddingTop 的屬性也沒有用求助

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號