3種jQuery彈出大圖效果

來源:互聯網
上載者:User

標籤:

本執行個體用到了jquery.imgbox.pack.js庫。直接看代碼:

 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 5 <meta name="keywords" content="" /> 6 <meta name="description" content="" /> 7 <title>3種jQuery彈出大圖效果</title> 8 <link rel="stylesheet" href="http://7u2iij.com1.z0.glb.clouddn.com/images_style.css" /> 9 <script type="text/javascript" src="js/jquery.min.js"></script>10 <script type="text/javascript" src="js/jquery.imgbox.pack.js"></script>11     <script type="text/javascript">12         $(document).ready(function() {13             $("#pic1").imgbox();14 15             $("#pic2").imgbox({16                 ‘zoomOpacity‘    : true,17                 ‘alignment‘        : ‘center‘18             });19 20             $("#pic3").imgbox({21                 ‘speedIn‘        : 0,22                 ‘speedOut‘        : 0,23                 ‘alignment‘        : ‘center‘,24                 ‘overlayShow‘    : true,25                 ‘allowMultiple‘    : false26             });27         });28     </script>29 </head>30 <body>31 <!-- 代碼 BEGIN -->32 <div id="content">33     <h1>imgBox--圖片點擊放大樣本</h1>34     <hr />35     <div id="images">36         <a id="pic1" title="圖片一" href="http://7u2iij.com1.z0.glb.clouddn.com/pic1.jpg"><img alt="" src="http://7u2iij.com1.z0.glb.clouddn.com/pic1.jpg" width="150" height="90" /></a>37         <a id="pic2" title="圖片二" href="http://7u2iij.com1.z0.glb.clouddn.com/pic2.jpg"/><img alt="" src="http://7u2iij.com1.z0.glb.clouddn.com/pic2.jpg" width="150" height="90" /></a>38         <a id="pic3" title="圖片三" href="http://7u2iij.com1.z0.glb.clouddn.com/pic3.jpg"><img alt="" src="http://7u2iij.com1.z0.glb.clouddn.com/pic3.jpg" width="150" height="90" /></a>39     </div>40     <div><a href="" target="_blank" class="download">本地下載</a></div>41 </div>42 <!-- 代碼 END -->43 <div style="text-align:center">44     <p>文章來源:<a href="http://www.cnblogs.com/iyitong/" target="_blank">cyt靜風</a></p>45 </div>46 </body>47 </html>

本地下載

3種jQuery彈出大圖效果

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.