网页增加Highslide的图片浏览(放大、缩小)效果

pop:自己测试了一下还很不错。。

Highslide下载:
http://www.uudisc.com/user/pop3067/file/1764853
http://115.com/file/bh0qw2yz
http://projects.jesseheap.com/downloads/highslide-wordpress/wp-highslide.zip

修改方法:

1、将下载到的Highslide文件放到网站目录下

2、在网页头部添加下面这段代码:

<script type="text/javascript" src="highslide/highslide.js"></script>
<script type="text/javascript">
hs.registerOverlay(
       {
           thumbnailId: null,
           overlayId: 'controlbar',
           position: 'top right',
           hideOnMouseOut: true
       }
   );
  
   hs.graphicsDir = 'highslide/graphics/';
   hs.outlineType = 'rounded-white'; //共有4种样式
   window.onload = function() {
       hs.preloadImages(5);
   }
</script>

2、图片的插入方式:

<a href="25.jpg" onclick="return hs.expand(this)"><img src="25_s.jpg" width="160" height="119" border="0" /></a>

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *