图片轮播

所有代码如下:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>jQuery无缝轮播插件 - 站长素材</title>

<link rel="stylesheet" href="css/ft-carousel.css" />
<style>
body{margin: 0;font-family: "微软雅黑";background-color: #1F1F1F;}
.example {width: 624px;height: 336px;font-size: 40px;text-align: center;margin: 20px auto;background-color: #464576;}
.carousel-item{line-height: 336px;color: #fff;font-family:  Arial Black}

ul,
ol,
li,
div {
	margin: 0;
	padding: 0;
}

ul,
ol {
	list-style: none;
}

.ft-carousel {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.ft-carousel .carousel-inner {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
}

.ft-carousel .carousel-inner .carousel-item {
	float: left;
	height: 100%;
}

.ft-carousel .carousel-item img {
	width: 100%;
}

.ft-carousel .carousel-indicators {
	position: absolute;
	left: 0;
	bottom: 10px;
	width: 100%;
	text-align: center;
	font-size: 0;
}

.ft-carousel .carousel-indicators span {
	display: inline-block;
	width: 12px;
	height: 12px;
	background-color: #fff;
	margin: 0 4px;
	border-radius: 50%;
	cursor: pointer;
}

.ft-carousel .carousel-indicators span.active {
	background-color: #de3a3a;
}

.ft-carousel .carousel-btn {
	position: absolute;
	top: 50%;
	width: 50px;
	height: 45px;
	margin-top: -25px;
	cursor: pointer;
}

.ft-carousel .carousel-prev-btn {
	left: 0;
	background: url(../img/prev.png) no-repeat;
}

.ft-carousel .carousel-next-btn {
	right: 0;
	background: url(../img/next.png) no-repeat;
}

</style>

</head>
<body>

<div class="example">
	<div class="ft-carousel" id="carousel_1">
		<ul class="carousel-inner">
			<li class="carousel-item"><img src="image/chun.jpg" alt="春"/></li>
			<li class="carousel-item"><img src="image/xia.jpg" alt="夏"/></li>
			<li class="carousel-item"><img src="image/qiu.jpg" alt="秋"/></li>
			<li class="carousel-item"><img src="image/dong.jpg" alt="冬"/></li>
		</ul>
	</div>
</div>

<script src="lunbojs/jquery.min.js"></script>
<script src="lunbojs/ft-carousel.min.js"></script>
<script type="text/javascript">

	$("#carousel_1").FtCarousel({
		index: 0,
		auto: true,
		time: 1500,
		indicators: false,
		buttons: true
	});
</script>
</body>
</html>

图片、js、源码地址:https://pan.baidu.com/s/19gGZsibqbElyZGf0NFS0xg

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值