欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  web前端

jQuery实现图片轮播幻灯片效果

程序员文章站 2022-04-21 07:51:58
...
这次给大家带来jQuery实现图片轮播幻灯片效果,jQuery实现图片轮播幻灯片效果的注意事项有哪些,下面就是实战案例,一起来看一下。

jQuery实现图片轮播幻灯片效果

小提示:浏览器中如果不能正常运行,可以尝试切换浏览模式。
(1)在head区域引入CSS样式:

<link href="styles/97zzw.css" rel="stylesheet" type="text/css" />

(2)js代码:

<script src="scripts/jquery.min_v1.0.js" type="text/javascript"></script>
<script src="scripts/slides.min.jquery_v1.0.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
 $('#slides').slides({
 preload: true,
 preloadImage: 'images/loading.gif',
 play: 5000,
 pause: 2500,
 hoverPause: true,
 fadeSpeed: 350,
 effect: 'fade'
 });
});
</script>

为大家分享的jQuery超精致图片轮播幻灯片特效代码如下

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>jQuery超精致图片轮播幻灯片特效</title>
<link href="styles/97zzw.css" rel="stylesheet" type="text/css" />
</head>
<body>
<style>
ul#bcty365_nav{padding-left:50px; margin-bottom:10px; border-bottom:2px solid #ccc; overflow:hidden; _zoom:1;}
ul#bcty365_nav li{float:left; display:inline; margin:10px;}
ul#bcty365_nav li a{display:block;color:#000000; font-size:16px;}
ul#bcty365_nav li a,#wimoban_p,#wimoban_p a{ font-family:"微软雅黑";}
ul#bcty365_nav li a:hover,#wimoban_p a:hover{color:red;}
</style> 
 <p id="focus">
 <p id="slides">
  <style type="text/css">
      ul.pagination{width:55px !important;}
    </style>
  <p class="slides_container">
  <a href="http://www.jb51.net/" title="微车" rel="external"><img src="images/focus/weiche_banner.png" alt="微车" /></a>
  <a href="http:http://www.jb51.net/" title="布丁电影票" rel="external"><img src="images/focus/ticket_banner.png" alt="布丁电影票" /></a>
  <a href="http://www.jb51.net/" title="布丁优惠券" rel="external"><img src="images/focus/coupon.jpg" alt="布丁优惠券" /></a>
  </p>
 </p>
 </p>
 
<script src="scripts/jquery.min_v1.0.js" type="text/javascript"></script>
<script src="scripts/slides.min.jquery_v1.0.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
 $('#slides').slides({
 preload: true,
 preloadImage: 'images/loading.gif',
 play: 5000,
 pause: 2500,
 hoverPause: true,
 fadeSpeed: 350,
 effect: 'fade'
 });
});
</script>
</body>
</html>

相信看了本文案例你已经掌握了方法,更多精彩请关注其它相关文章!

推荐阅读:

jquery拖拽效果实现方法

jQuery实现图片连接无缝滚动

以上就是jQuery实现图片轮播幻灯片效果的详细内容,更多请关注其它相关文章!