我的图片不切换呢?

来源:2-3 图片灯箱插件——lightBox

慕勒5926719

2017-03-09 10:34

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <title>图片灯箱插件</title>
   <link rel="stylesheet" type="text/css" href="http://www.imooc.com/data/jquery.notesforlightbox.css" />
   <link href="css/lightBox.css" rel="stylesheet" type="text/css" />
   <script type="text/javascript" src="http://www.imooc.com/data/jquery-1.8.2.min.js"></script>
   <script type="text/javascript" src="http://www.imooc.com/data/jquery.notesforlightbox.js"></script>
</head>

<body>
<div id="divtest">
   <div class="title">
       <span class="fl">我的相册</span>
   </div>
   <div class="content">
       <div class="divPics">
           <ul>
               <li><a href="http://img.mukewang.com/52e489f20001ecfc04480275.jpg" title="第1篇风景图片">
                   <img src="http://img.mukewang.com/52e489f20001ecfc04480275.jpg" alt="" />
               </a></li>
               <li><a href="http://img.mukewang.com/52e48a1e0001eec804480275.jpg" title="第2篇风景图片">
                   <img src="http://img.mukewang.com/52e48a1e0001eec804480275.jpg" alt="" />
               </a></li>
               <li><a href="http://img.mukewang.com/52e48a4c00015ad204480275.jpg" title="第3篇风景图片">
                   <img src="http://img.mukewang.com/52e48a4c00015ad204480275.jpg" alt="" />
               </a></li>
           </ul>
       </div>
   </div>
</div>

<script type="text/javascript">
   $(function () {
       $('.divPics a').lightBox({
           overlayBgColor: "#666", //图片浏览时的背景色
           overlayOpacity: 0.5, //背景色的透明度
           containerResizeSpeed: 600 //图片切换时的速度
       })
   });
</script>
</body>
</html>

写回答 关注

1回答

  • 慕勒5926719
    2017-03-09 10:39:53

    可以了

jQuery基础(五)一Ajax应用与常用插件

如何用jquery实现ajax应用,加入学习,有效提高前端开发速度

69095 学习 · 400 问题

查看课程

相似问题