RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
怎么用jQuery实现手风琴效果

这篇文章主要讲解了“怎么用jQuery实现手风琴效果”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么用jQuery实现手风琴效果”吧!

成都创新互联于2013年创立,先为厦门等服务建站,厦门等地企业,进行企业商务咨询服务。为厦门企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。

js代码:



   $(function() {
    //获取所有li遍历
    $(".li_list").each(function() {
     //当鼠标进去当前li
     $(this).mouseenter(function() {
      //设置当前元素宽度
      $(this).stop()
        .animate({ "width": "600px" }, 500, "linear");
        //设置同胞元素宽度
        .siblings().stop()
           .animate({ "width": "100px" }, 500, "linear");
     });
    });
   });
  

css代码:

 .li_list {
    width: 100px;
    height: 300px;
    list-style: none;
    float: left;
    overflow: hidden;
   }

   .li_list img {
    width: 100%;
    height: 100%;
   }

   .divbg {
    width: 600px;
    height: 300px;
    background: rgba(230, 0, 0, 0.5);
    text-align: center;
    line-height: 300px;
    float: left;
   }

   .divbg span {
    display: block;
    width: 100px;
    height: 300px;
    float: left;
   }

   .div1 {
    width: 500px;
    height: 300px;
    float: left;
   }
   .mo{
    width: 600px;
   }

html代码:


   
    
     萌宠
     
      
     
    
                  萌宠                   
    
                  萌宠                   
    
                  萌宠                   
    
      

感谢各位的阅读,以上就是“怎么用jQuery实现手风琴效果”的内容了,经过本文的学习后,相信大家对怎么用jQuery实现手风琴效果这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是创新互联,小编将为大家推送更多相关知识点的文章,欢迎关注!


网站题目:怎么用jQuery实现手风琴效果
文章转载:http://sczitong.cn/article/jdpise.html