-1

我有 100 张图片可以放在我的网站上的一个 div 中。我想放 20 张图片并在下面给出页码,这样如果用户点击“2”,它就会进入下 20 张图片。这怎么可能。我试过搜索,但找不到任何答案

4

1 回答 1

0

Depends really how your page serves these images. If you have a static HTML page then your only option would be to use JavaScript/jQuery.

If info about your images is serves from a database behind your web application then you can use pagination and routing. For instance you could have an url http://mydomain.com/images and this would select the first 20 images from your database then bellow you gallery you can have a set of links Previous and Next and when you click on Next it takes you to the url http://mydomain.com/images/20 still the gallery page only /20 appended to it to use as an offset for your SQL Query.

Tho seems what you really need is just a simply jQuery image gallery something like this:

  1. http://www.tn3gallery.com/?refCode=fe8775
  2. http://galleria.io/
  3. http://spaceforaname.com/galleryview/#
  4. http://tympanus.net/codrops/2010/06/24/multimedia-gallery/
于 2013-10-21T11:41:40.790 回答