需要显示的HTML页面(与CSS)作为一本书的页面翻转页面、一本书、HTML、CSS

2023-09-06 18:21:55 作者:一个人堕落

所以我有一个CSS本地HTML文件,我需要在一本书的形式来显示此文件(滚动左/右视图previous /下一个内容,而不是上下)。我想到了一个非常复杂的方式来实现这一目标:

So I have a local HTML file with CSS and I need to display this file in the form of a book (scroll left/right to view previous/next content, not up and down). I've thought of a really complicated ways to achieve this:

A 的WebView的图库 取值禁用滚动在的WebView 在轻扫,滚动的WebView 下来的高度的WebView A Gallery of WebViews Disable scrolling in the WebView On swipe, scroll the WebView down the height of the WebView

有就是这种方法的几个问题:

There's a couple of problems with this approach:

我得有加载每个的WebView的HTML内容(效率极低)存在的可能性,即在页面的底部,将有一些内容部分隐藏 I'd have to have the HTML content loaded for each WebView (extremely inefficient) There exists the possibility that at the bottom of the page, there would be some content partially hidden

我在找对如何处理这个问题,唯一的一些建议,我用声音可怕的走了过来。谢谢!

I'm looking for some suggestions on how to approach this problem, as the only thing I've came up with sounds dreadful. Thanks!

推荐答案

您可以并排使用两个frame或iframe侧和右侧框架加载左帧奇数页号和偶数页页码。把每个页面或帧下一个javascript的滚动条,并与页面翻转动画的div时,页面加载到框架,你可以打开或关闭一些花哨的控制按钮。我认为这是可行的完全,实际上可能是pretty光滑。

You could use two frames or iframes side by side and load odd page numbers in the left frame and even page numbers in the right frame. Put some fancy control buttons on each page, or a javascript scrollbar under the frames, and a div with a page-flipping animation that you can turn on or off when pages are loaded into the frames. I think it's totally doable, and could actually be pretty slick.