The Credence Dot Com 科利登的dot com
You seem to be using a version of Internet Explorer.你似乎可以用一个版本的ie 。 For a safer browsing experience, please consider一个更安全的浏览体验,请考虑 and

If you're new here, you may want to subscribe to our RSS feed as well as to our NewsLetter (on Top Right hand menu) to get highly informative articles weekly...and NO, we never spam!如果你是新这里,你可以订阅我们的rss以及我们简讯 (顶右手菜单) ,以获得翔实周刊文章… …不,我们从来垃圾!

What this article will actually teach you Is how to develop a JavaScript gallery that is backed up by a PHP script – a very often used combination for when trying to build up a nice and useful gallery.这是什么文章其实教导你的是如何发展一个javascript画廊是后盾php脚本-一个很常用的组合,当试图建立一个好的和有用的画廊。

What is a thumbnail gallery?什么是缩略图画廊?

Of course, before starting anything we need to know what exactly a thumbnail gallery is and what it is useful for (or in more popular terms – what does it do?).当然,出发前什么,我们必须知道什么缩略图画廊是什么和它是有用的(或较受欢迎的条款-做些什么呢? ) 。 Remember when web browsers have just started supporting images and web connections speeds were so slow that we were measuring them in single kilobits?记得当浏览刚开始支持图象和网络连接的速度这么慢,我们测量了他们在单千? Of course you do.当然,你做的。 Now, the job of a thumbnail gallery was, and still is to display several smaller previews of the original images.现在,就业的缩略图画廊是,现在仍然是展示一些较小的预演原始影像。

Smaller not only in dimensions but also in file size – this is even more important.小不仅在尺寸,而且在档案大小-这是更重要。 This would mean that anyone who would visit the gallery would not be required to download all images, but only the one that he needs or wants.这将意味着任何人将参观画廊,将无需下载所有图像,但只有一个,他需要或想要。 This saves you server traffic, and him, time.这可以节省你的服务器交通,并他的时候。 The problem occurs when most of these thumbnail galleries fail to do exactly this – avoid making the user download all the files.问题发生时,大部分这些缩略图画廊未能做到这一点-避免使用户下载所有档案。 Even more, if you resize your images using CSS and JavaScript, or you simply use HTML attributes for resizing you will find yourself with a bunch of low-quality thumbnails.更有什者,如果你resize你的图片用css和javascript的,或者你简单地使用html属性为缩放,你会发现自己与一群低品质图片。

In order to avoid this, and offer thumbnail galleries as they should like, you will need to create smaller pictures of the large images that you intend to put in your gallery.为了避免这种情况,并提供缩略图画廊,因为他们想,你将需要创造较小的照片大画面,你打算把你的画廊。 There are several ways to do this – through a batch process before you upload the gallery or simply using a script on the server.有几种方法来做到这一点-通过批处理过程,然后你上传画廊或干脆用一个脚本对服务器。

Using Javascript to fake dynamic galleries用javascript假画廊动态

Nowadays static galleries are rather boring, so go for dynamic galleries.如今静态的画廊都是比较沉闷,所以去动画廊。 In order to create a dynamic gallery from a static thumbnail gallery you can use JavaScript.为了创造一个充满活力画廊从静态缩略图画廊,你可以使用javascript的。 You will turn it into a dynamic gallery by simply applying to all thumbnails a series of event handlers.你会变成一个充满活力画廊只是适用于所有缩略图的一系列事件处理器。 Still, you should keep the gallery even for users that do not use JavaScript.还有,你应该把画廊即使使用者不使用javascript的。 Use the script below:使用脚本如下:

   <ul id =”thumbnails” > <li> <a href =”gallery/temp/img1.jpg” > <img src =”gallery/temp/img1_th.jpg” alt =”img1_th.jpg”/ > </a> </li> <li> <a href =”gallery/temp/img2.jpg” > <img src =”gallery/temp/img2_th.jpg” alt =”img2_th.jpg”/ > </a> </li>       [… and so on with the thumbnails …] </ul>   <ul 身份证 ="thumbnails" > <li> <a href ="gallery/temp/img1.jpg" > <集团  = " gallery/temp/img1_th.jpg " 低价竞标 = " img1_th.jpg " / > < / > < / 李> <li> <a href ="gallery/temp/img2.jpg" > < 集团  = " gallery/temp/img2_th.jpg " 低价竞标 = " img2_th.jpg " / > < / > < /李 > [ … …等与图片… … ] < /超微结构 > 

Now you can start creating a dynamic gallery using JavaScript!现在你可以开始创建一个动态廊用javascript ! Good luck!好运!

Related Articles - Yahoo Library with PHP | Create Own Del.icio.us Clone | Build Site like Reddit or Digg 相关文章-雅虎图书馆与p hp|造自己的d el.icio.us的克隆|站建设一样雷迪特或谊

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages. 份额享受: 这些图标连接社会书签场所读者能分享和发现新的网页。
  • Digg
  • del.icio.us
  • DZone
  • ThisNext
  • blinkbits
  • BlinkList
  • blogmarks
  • Fark
  • Furl
  • Netscape
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet) (没有收视率却)
Loading ...  Loading ...装载...

Links you may find interesting -联系,你可以找到有趣-

Post A Comment邮报评论