vue-fullpage
README:中文版
A sigle-page scroll plugin based on vue.js
overview
To achieve sigle-page scroll in mobile, support horizontal scroll and vertical scroll, support all the animation instructions of animate.css.
Online demo
here's a jsfiddle demo
Installation
npm install vue-fullpage --save
If you want use animate instruction, please install animate.css
npm install animate.css --save
Document
getting started
main.js
Import the plugin of css and js file in main.js
Vue
app.vue
template
fullpage-container
、fullpage-wp
、page
are default class name.
Add the v-fullpage
command to the page-wp
container.
Add the v-animate
command to the page
container.
vue-fullpage vue-fullpage vue-fullpage vue-fullpage vue-fullpage
script
vue-fullpage
value please refer to api document
{ return opts: start: 0 dir: 'v' duration: 500 { } { } }
style
Set the page-container
container's width and height what do you want, and the v-fullpage
command will adapt the width and height of the parent element.
The following settings allow the scrolling page to fill the full screen.
<style>
.page-container {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
</style>