Home > Article > Web Front-end > How jquery fullpage plug-in operates the header and tail
This time I will bring you jquery How the fullpage plug-in operates the head and tail, what are the precautions for the jquery fullpage plug-in to operate the head and tail, the following is a practical case, Let’s take a look.
Preface
We create a page through the jquery-fullpage plug-in, and the entire page is full-screen scrolling. However, we want to add a copyright to the last page, which is only about 100px high, without requiring a full screen for the copyright. How to do it? Search After a while, various methods were mentioned. Modify the source code, etc., or write your own code to judge. Dizzy. In fact, the official solution has been provided.
Below, let’s briefly talk about how to implement it
In fact, only the html part is needed to implement it
<p class="fullpage"> <p class="section fp-auto-height">这里写头部</p> <p class="section">page1</p> <p class="section">page2</p> <p class="section">page3</p> <p class="section">page4</p> <p class="section fp-auto-height">这里写版权</p> </p>
As above, I won’t talk about the js code. As long as you can run it, there will be no problem. Here you only need to add an fp-auto-height class to the head and bottom.
Isn’t it effective?
Hey, that’s because you only quote the js but not the css. Just quote the following css.
https://github.com/alvarotrigo/fullPage.js/blob/master/dist/jquery.fullpage.css
In fact, the key code is just as follows
.fp-auto-height.fp-section, .fp-auto-height .fp-slide, .fp-auto-height .fp-tableCell{ height: auto !important; } .fp-responsive .fp-auto-height-responsive.fp-section, .fp-responsive .fp-auto-height-responsive .fp-slide, .fp-responsive .fp-auto-height-responsive .fp-tableCell { height: auto !important; }
Summary
Your problem may have been encountered by others before, and someone must have solved it for you. Just be good at using search index engines.
fullpage github
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!
Recommended reading:
Summary of methods to remove code specification detection in vue
Vue.js Flask\Build a single page Detailed explanation of APP case (with code)
Detailed explanation of Vue implementation of picture carousel component tutorial
The above is the detailed content of How jquery fullpage plug-in operates the header and tail. For more information, please follow other related articles on the PHP Chinese website!