国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

jQuery實現(xiàn)點擊小圖顯示大圖代碼分享

2019-11-20 11:43:43
字體:
供稿:網(wǎng)友

本文實例講述了jQuery實現(xiàn)點擊小圖顯示大圖效果。分享給大家供大家參考。具體如下:
這是一款基于jQuery實現(xiàn)的點擊小圖查看大圖的代碼,適合用于產(chǎn)品展示等環(huán)節(jié),便于用戶瀏覽產(chǎn)品細節(jié),是一款非常實用的特效代碼。
運行效果圖:    ----------------------查看效果-----------------------

小提示:瀏覽器中如果不能正常運行,可以嘗試切換瀏覽模式。
為大家分享的jQuery實現(xiàn)點擊小圖顯示大圖效果代碼如下

<head>  <title>jQuery實現(xiàn)點擊小圖顯示大圖效果</title> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="js/jquery.mousewheel-3.0.2.pack.js"></script> <script type="text/javascript" src="js/jquery.fancybox-1.3.1.js"></script> <script type="text/javascript" src="js/pngobject.js"></script> <link rel="stylesheet" href="style/style.css" type="text/css" /> <link rel="stylesheet" href="style/jquery.fancybox-1.3.1.css" type="text/css" /> <script type="text/javascript"> $(document).ready(function() {  /*  *  Examples - images  */  $("a#example1").fancybox({  'titleShow' : false  });  $("a#example2").fancybox({  'titleShow' : false,  'transitionIn' : 'elastic',  'transitionOut' : 'elastic'  });  $("a#example3").fancybox({  'titleShow' : false,  'transitionIn' : 'none',  'transitionOut' : 'none'  });  $("a#example4").fancybox();  $("a#example5").fancybox({  'titlePosition' : 'inside'  });  $("a#example6").fancybox({  'titlePosition' : 'over'  });  $("a[rel=example_group]").fancybox({  'transitionIn' : 'none',  'transitionOut' : 'none',  'titlePosition' : 'over',  'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {   return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? '   ' + title : '') + '</span>';  }  });  /*  *  Examples - various  */  $("#various1").fancybox({  'titlePosition' : 'inside',  'transitionIn' : 'none',  'transitionOut' : 'none'  });  $("#various2").fancybox();  $("#various3").fancybox({  'width'  : '75%',  'height'  : '75%',  'autoScale'  : false,  'transitionIn' : 'none',  'transitionOut' : 'none',  'type'  : 'iframe'  });  $("#various4").fancybox({  'padding'  : 0,  'autoScale'  : false,  'transitionIn' : 'none',  'transitionOut' : 'none'  }); }); </script></head><body><div id="content"> <h4>jQuery 實現(xiàn)點擊小圖顯示大圖</h4> <p> <a rel="example_group" href="example/11.jpg" title="Lorem ipsum dolor sit amet"><img alt="" src="example/1.jpg" /></a> <a rel="example_group" href="example/22.jpg" title=""><img alt="" src="example/2.jpg" /></a> <a rel="example_group" href="example/44.jpg" title=""><img alt="" src="example/4.jpg" /></a> </p> <p> <a rel="example_group" href="example/33.jpg" title=""><img alt="" src="example/3.jpg" /></a> <a rel="example_group" href="example/8_b.jpg" title=""><img alt="" src="example/8_s.jpg" /></a> <a rel="example_group" href="example/9_b.jpg" title=""><img alt="" src="example/9_s.jpg" /></a> </p></div><div><p> </p></div></body></html>

以上就是為大家分享的jQuery實現(xiàn)點擊小圖顯示大圖效果代碼,希望大家可以喜歡。

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 哈密市| 道孚县| 邢台市| 内黄县| 丰城市| 阿鲁科尔沁旗| 蛟河市| 格尔木市| 东阿县| 南木林县| 鹿泉市| 汉沽区| 行唐县| 汉阴县| 新丰县| 沾化县| 阿荣旗| 马公市| 肇庆市| 四平市| 阳春市| 青州市| 佛学| 石城县| 横山县| 平阴县| 彝良县| 乌苏市| 左权县| 高碑店市| 九江市| 临安市| 兖州市| 镇安县| 北海市| 郑州市| 津南区| 济阳县| 陆川县| 固始县| 方城县|