<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
<style>
*{margin:0;padding:0;}
body{font-size:12px;}
#accordion{width:727px; height:350px; margin:100px auto 0 auto; position:relative; overflow:hidden; border:1px solid #CCC;}
#accordion ul{list-style:none;}
#accordion ul li{width:643px;height:350px; position:absolute; background:#FFF;}
#accordion ul li span{display:block;width:20px; height:350px; float:left; text-align:center; color:#FFF; padding-top:5px; cursor:pointer;}
#accordion ul li img{display:block; float:right;}
.bar01{left:0px;}
.bar02{left:643px;}
.bar03{left:664px;}
.bar04{left:685px;}
.bar05{left:706px;}
.bar01 span{background:#09E0B5;}
.bar02 span{background:#3D7FBB;}
.bar03 span{background:#5CA716;}
.bar04 span{background:#F28B24;}
.bar05 span{background:#7C0070;}
</style> <script type="text/javascript"> $(function(){ $('#accordion li').click(function() { $(this).animate({left:$(this).index()*21}); $(this).prevAll().each(function(){ $(this).animate({left:$(this).index()*21}); }); $(this).nextAll().each(function(){ $(this).animate({left:(727-(5-$(this).index())*21)});
}); }); }) </script> <title>手风琴效果</title>
</head> <body>
<div id="accordion">
<ul>
<li class="bar01"><span>非洲景色01</span><img src="data:images/001.jpg" /></li>
<li class="bar02"><span>非洲景色02</span><img src="data:images/002.jpg" /></li>
<li class="bar03"><span>非洲景色03</span><img src="data:images/003.jpg" /></li>
<li class="bar04"><span>非洲景色04</span><img src="data:images/004.jpg" /></li>
<li class="bar05"><span>非洲景色05</span><img src="data:images/005.jpg" /></li>
</ul>
</div>
</body>
</html>

jquery横向手风琴效果2的更多相关文章

  1. 基于jquery横向手风琴效果

    基于jquery横向手风琴效果是一款基于jquery实现的左右滑动手风琴图片轮播切换特效.效果图如下: 在线预览   源码下载 效果图如下: <div class="flash&quo ...

  2. jquery横向手风琴效果

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  3. jQuery横向手风琴图片滑块

    jQuery横向手风琴图片滑块是一款非常不错的jQuery特效横向手风琴图片滑块插件,可以自动播放,也可以鼠标滑过时切换.+ 欢迎喜欢的朋友下载研究 源码下载页:http://www.huiyi8.c ...

  4. jquery 图片手风琴效果

    这篇主要是手风琴效果和无缝切换相结合,在Demo里的Demo3.html.Demo4.html. 手风琴原理比较简单,当鼠标经过的时候改变图片的路径,鼠标移到另一张图片时还原路径. 虽然原理简单,但是 ...

  5. jquery实现手风琴效果

    html----accordion.html <!DOCTYPE html> <html lang="en"> <head> <meta ...

  6. jQuery做出手风琴效果

    今天学到JQuery中的遍历-siblings,便手痒做了个手风琴的动态效果,有一点收获,分享给大家.mouseout的时候一定要记得opacity必须设置,不然li的opacity会保持mousem ...

  7. jQuery横向手风琴

    在线演示 本地下载

  8. jquery版手风琴效果

    <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...

  9. jQuery实现手机竖直手风琴效果

    效果:http://hovertree.com/texiao/jquery/65/ 效果图: 手机扫描二维码查看效果: 代码: <!doctype html> <html lang= ...

随机推荐

  1. Machine learning preface

    Machine learning Preface Definition T: Task E: Experience P: Performance Sequence: T -> E -> P ...

  2. macOS 从睡眠中恢复出来之后没有声音的解决方案

    打开Active Monitor, 找到coreaudiod进程, 将其quit掉即可

  3. Unity C# 关于Attribute的使用

    最近在研究Attribute,感觉挺好玩,搜到一篇不错的文章,分享给大家 原文:未知?找到后补上! 举两个例子,在变量上使用[SerializeFiled]属性,可以强制让变量进行序列化,可以在Uni ...

  4. 随机练习:C#实现维吉尼亚加密与解密(解密前提为已知密匙)

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  5. [LeetCode]14. Longest Common Prefix最长公共前缀

    Write a function to find the longest common prefix string amongst an array of strings. If there is n ...

  6. Spring cloud微服务 Hystrix熔断器学习教程

    以下demo代码:https://github.com/wades2/HystrixtDemo 官网定义:Hystrix是一个延迟容错库.在分布式环境中,许多服务依赖项中的一些不可避免地会失败.Hys ...

  7. ACM-单调队列用于DP优化

    http://www.cnblogs.com/ka200812/archive/2012/07/11/2585950.html 待续

  8. 详解__FILE__与$_SERVER['SCRIPT_FILENAME']的区别

    废话不多说 直接上测试代码: <?php //引入的是ceshi4文件夹下的ceshi4.php; require_once './ceshi4/ceshi4.php'; 下面是ceshi4文件 ...

  9. 无法找到msvcp90.dll的一个碰巧解决办法

     作者:朱金灿 来源:http://blog.csdn.net/clever101 上周同事使用VS2008编译一个C++的控制台工程.工程在release模式下可以编译成功,但是运行总是出现无法 ...

  10. 【Android学习入门】Android中activity的启动模式

    启动模式简单地说就是Activity启动时的策略,在Androidmanifest.xml文件中的标签android:launchMode属性设置,在Android中Activity共有四种启动模式分 ...