1、调用CSS样式:
<link href="css/animate.css" rel="stylesheet" type="text/css" />
<link href="css/bootslider.css" rel="stylesheet" type="text/css" />
<link href="css/bs-theme-metro.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
2、调用JS插件代码:
<script src="js/jquery-1.10.1.min.js" type="text/javascript"></script>
<script src="js/touchSwipe.js" type="text/javascript"></script>
<script src="js/fitvids.js" type="text/javascript"></script>
<script src="js/bootslider.js" type="text/javascript"></script>
3、添加HTML代码:
将<!--效果html开始-->......<!--效果html结束-->之间的html和js代码;放在<body></body>之间。
4、实例化代码:
<script>
$(document).ready(function() {
var slider = new bootslider('#bootslider', {
animationIn: "fadeInUp",
animationOut: "flipOutX",
timeout: 5000,
autoplay: true,
preload: true,
pauseOnHover: false,
thumbnails: true,
pagination: true,
mousewheel: false,
keyboard: true,
touchscreen: true
});
slider.init();
});
</script>