简体   繁体   English

在FullPage.js部分添加自定义菜单

[英]Add custom menu on FullPage.js section

I am using fullpage.js for my website. 我正在为我的网站使用fullpage.js。 I was wondering if I can add a non-sticky menu to all my sections, I have tried just to put the menu code on all my website section, But it is make my website slowly. 我想知道是否可以在我的所有部分中添加非粘性菜单,我只是尝试将菜单代码放在我的所有网站部分中,但这会使我的网站运行缓慢。 Someone have any ideas? 有人有什么想法吗?

So you want for each individual section to have its own menu? 因此,您希望每个部分都有自己的菜单吗?

In that case this might do 在这种情况下,这可能会

html: HTML:

<div id="fullpage">
  <div class="section">section 1</div>
  <div class="section">
    <div class="sectionMenue">This is the menue for section 2</div>
    section 2
  </div>
  <div class="section">
    <div class="sectionMenue">This is the menue for section 3</div>
    section 3
  </div>
<div class="section">section 4</div>

css: CSS:

.sectionMenue {
  position: absolute;
  top: 0px;
}

JSFiddle 的jsfiddle

fullpage will modify all of the sections once it runs, making the positions of all the sections fixed. 全页页面运行后将修改所有部分,从而固定所有部分的位置。 that means that any absolute positioning inside one of these sections will position it relative to the section itself. 这意味着这些部分之一内的任何绝对定位都会使其相对于部分本身定位。 Hope that makes sense 希望有道理

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

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