dongya8378 2013-02-18 14:56
浏览 39
已采纳

将数据加载到水平时间轴中

I want to create a full-screen timeline web application that would scroll left and right horizontally, revealing some html-and-css-formatted text possibly with added images, videos and / or audio files.

The timeline should start at its rightmost position ("today's date"), offering a scroller that would allow user to scroll left to see earlier events, and to scroll back towards the right to see somewhat later events, all the way back to its rightmost position (the already mentioned "today's date").

There's a lot of data to load into the timeline (150+ years worth of events, about 200 pages of text alone) – which makes me think that if I dump all of it into a horizontally formatted, scrollable html page, it may result in a super-heavy page that would take forever to load, may be hard to scroll in some (most?) browsers, and may even crash the browsers. (I may be mistaken, though. Please see my Question # 1.)

So I'm considering the solution when the needed data loads into the page when the page is scrolled "close" to it (on the left or on the right), and unloads again when the page scrolls far enough away from it.

Not being a web programming "guru", I'm a little baffled by the task, and would appreciate a bit of advice.

My questions:

  1. Am I wrong in supposing that all the data should not be loaded into the horizontal page right away? Maybe it's okay to do so?

  2. What would be the more browser-friendly way to handle the overall process: a) spend a few seconds preloading all the data for the entire timeline from the database, and then echo the pieces of that data into a div when they are needed? - or b) only load the pieces of data from the database when they are needed?

  3. How can that pre-loading/printing or loading be actually accomplished with PHP/HTML?

  4. Maybe someone knows an open source or commercial horizontal timeline that already does what I'm describing?

Thank you in advance!

  • 写回答

2条回答 默认 最新

  • duangu4943 2013-02-18 15:31
    关注
    1. It is up to your case. But I think that idea is great (I just think your timeline look like a gallery, an album,..).
    2. My answer is both a and b . I will load the pieces of data from the database when they are needed(but I will load these data when the page is scrolled "close" to it ) Ex: I'm in 2013 , I will spend a few seconds to load 2011, and 2012 (or last 100 items)

    3. I think that We can load data through ajax.

    4. I really don't know, but I think that you can custom/inherit something from the framework, which was introduced in Raad's Answer.

    -5. You can create your own timeline. Maybe You will spend so many hours to do this.

    How can we create this timeline?. You can search with keyword : infinite scroller.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 运筹学排序问题中的在线排序
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 lammps拉伸应力应变曲线分析
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试,帮帮忙吧