简体   繁体   English

fullPage.js菜单未显示为示例

[英]fullPage.js Menu Does Not Appear As In Example

I already imported js and css files of fullPage. 我已经导入了fullPage的js和css文件。 This is the body: 这是身体:

<ul id="menu">
    <li data-menuanchor="home"><a href="#main">Main</a></li>
    <li data-menuanchor="phonetics"><a href="#phonetics">Phonetics</a></li>
    <li data-menuanchor="search"><a href="#search">Search</a></li>
    <li data-menuanchor="about"><a href="#about">About</a></li>
</ul>
<div id="fullpage">
    <div class="section">
        a
    </div>
    <div class="section"></div>
    <div class="section">c</div>
    <div class="section">d</div>
</div>

This is the script: 这是脚本:

$(document).ready(function(){
    $("#fullpage").fullpage({
        menu: "#menu",
        anchors:["main", "phonetics", "search", "about"],
        css3: true,
        loopBottom:false,
        loopTop:false,
        keyboardScrolling: false,
        sectionSelector: ".section",
        slideSelector: ".slide",

        /* http://www.colorcombos.com/color-schemes/14/ColorCombo14.html */
        sectionsColor: ["#443266", "#C3C3E5", "#F1F0FF", "#8C489F"]
    });
});

fullPage works great, but menu does not appear as in example . fullPage效果很好,但菜单未如example所示 This is how menu looks like: 菜单如下所示:

The things I use: 我使用的东西:

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery.fullPage.min.js"></script>
<script type="text/javascript" src="js/html-phonetics-library.js"></script>
<script type="text/javascript" src="js/script.js"></script>

<link rel="stylesheet" href="css/reset.css" />
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/bootstrap-theme.min.css" />
<link rel="stylesheet" href="css/font-awesome.min.css" />
<link rel="stylesheet" href="css/ie.css" />
<link rel="stylesheet" href="css/jquery.fullPage.css" />
<link rel="stylesheet" href="css/style.css" />

fullPage works great, but menu does not appear as in example. fullPage效果很好,但菜单未如示例中所示。

That's because fullpage.js doesn't provide the styles for the menu . 那是因为fullpage.js没有提供menu的样式 It is only there in the examples because the examples are using another stylesheet. 仅在示例中存在,因为示例使用了另一个样式表。

You are suppose to create your own menus and not just use the ones fullpage.js is using for the examples. 您应该创建自己的菜单,而不仅仅是使用fullpage.js用于示例的菜单。

But if you really want to use its menu, take a look at the examples stylesheet or include it in your project by using the examples.css file used in all the examples . 但是,如果您真的想使用其菜单,请查看示例样式表,或者使用所有示例中使用的examples.css文件将其包含在项目中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM