1

在移动设备上进行测试时,我尝试的一切都失败了。加载时间长得令人无法接受,滚动很生涩等等。我正在使用的缩略图是 120 像素宽。我知道这不是一个具体的问题,但我想听听您将如何解决此类问题?

4

2 回答 2

5

I can think of three approaches

  1. the classic way: use pagination, display only 10/20/50.. thumbnails per page
  2. the modern (complex) way: add images when the user is scrolling, remove images from the DOM when they leave the visible area (best known example: the google picture search)
  3. the clumsy way: splice the images together on the server, serve them as cluster of for example 3 x 5 thumbs
于 2012-05-24T10:57:47.600 回答
1

I would suggest you not to make all the thumbnails load at once. You can load 50 or hundred thumbnails when the page loads first and load remaining if they click on load more. Or you can organize them into pages

Loading at once makes your web page size more than an MB which will obviously take a lot of time to load

于 2012-05-24T10:57:10.157 回答