简体   繁体   中英

Swiper.js for switching between html pages

I am trying to use swiper.js to make my html pages swipable. I have three html pages: 'main page', 'user profile page' and 'content page'. Reading the swiper.js documentation the examples only show how to swipe eg photos in a div. Hence I have no clue on how to swipe html pages.

My question: Should all three html pages actually just be one html, but seperated within a div each?

You can replicate your pages as individual slides and use Hash/History Navigation (see demo ), but the downside is that your content will not be very accessible to users as the Swiper code hijacks a lot of touch controls within the container.

You would be better off using something like smoothState.js .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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