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条)

报告相同问题?

悬赏问题

  • ¥50 potsgresql15备份问题
  • ¥15 Mac系统vs code使用phpstudy如何配置debug来调试php
  • ¥15 目前主流的音乐软件,像网易云音乐,QQ音乐他们的前端和后台部分是用的什么技术实现的?求解!
  • ¥60 pb数据库修改与连接
  • ¥15 spss统计中二分类变量和有序变量的相关性分析可以用kendall相关分析吗?
  • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?
  • ¥20 神经网络Sequential name=sequential, built=False
  • ¥16 Qphython 用xlrd读取excel报错
  • ¥15 单片机学习顺序问题!!
  • ¥15 ikuai客户端多拨vpn,重启总是有个别重拨不上