zl程序教程

您现在的位置是:首页 >  前端

当前栏目

滚动图片效果jquery实现回旋滚动效果

jQuery 实现 图片 效果 滚动
2023-06-13 09:14:43 时间
今天在网上找到一款回旋滚动效果,拿出来和大家一起分享。先上效果图:
 
html代码:
复制代码代码如下:

<!DOCTYPEHTML>
<htmllang="en-US">
<head>
<metacharset="UTF-8">
<title>jquery-roundabout</title>
<styletype="text/css">
*{padding:0;margin:0;}
body{font:24pxtahoma;}
ul{list-style:none;margin:100pxauto0;width:500px;height:200px;}
li{line-height:200px;height:200px;width:300px;background:#ccc;text-align:center;cursor:pointer;}
li.roundabout-in-focus{cursor:default;}
</style>
</head>
<body>
<ulclass="roundabout">
<li>Block1</li>
<li>Block2</li>
<li>Block3</li>
<li>Block4</li>
<li>Block5</li>
</ul>
</body>
</html>
<scripttype="text/javascript"src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<scripttype="text/javascript"src="js/jquery.roundabout.min.js"></script>
<scripttype="text/javascript">
$(function(){
$(".roundabout").roundabout();
});
</script>

关于roundabout.js的代码可以去官网上下载,这里就不写了,太长了。点击官网地址。