1、调用CSS样式
<link rel="stylesheet" type="text/css" href="css/style.css" />
2、调用JS代码
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="jquery.imgscroll.min.js"></script>
3、添加HTML代码:
将
<!--效果开始-->......
<!--End-->之间的html代码;放在<body></body>之间。
4、代码应用:
<script type="text/javascript">
$(function(){
imgScroll.rolling({
name:'g1',
width:'380px',
height:'180px',
direction:'top',
speed:10,
addcss:true
});
imgScroll.rolling({
name:'g2',
width:'380px',
height:'180px',
direction:'left',
speed:20,
addcss:true
});
imgScroll.rolling({
name:'g3',
width:'380px',
height:'180px',
direction:'bottom',
speed:30,
addcss:true
});
imgScroll.rolling({
name:'g4',
width:'380px',
height:'180px',
direction:'right',
speed:40,
addcss:true
});
})
</script>