Sliding An Entire Web Page

前端 未结 10 2107
南笙
南笙 2020-12-09 00:14

Is there a way to mimic the native transition and functionality of \"sliding entire pages\" like you see on the iPhone but inside a web browser instead?

I want one H

10条回答
  •  旧时难觅i
    2020-12-09 00:42

    Just as a theoretical example, but I would create static HTML pages and use jQuery to load the content from them (to provide compatibility). The main problem would be the scrolling.

    I use jQuery to calculate the width of the browser, set that to be the width of the , and then set overflow: hidden. Then, just create an absolutely positioned content box, and slide both of them at once.

    I'll post some code later, but this is what I would begin with (I, being a pathetically incompetent JS fiddler).

提交回复
热议问题