久久资源网

html5 css3简洁的图片切换特效

html5 css3简洁的图片切换特效

2019-06-13 10:38:45 HTML5实例

售价:5.00积分 会员免费

特别声明:资源售价只是赞助,不代表代码或者素材本身点数。收取费用仅维持本站的日常运营所需!

html5 css3简洁的图片切换特效

【原创】TweenMax基于css3属性制作简洁大气的自适应图片切换,带左右弹性箭头按钮和索引控制切换效果。这是一款响应式的图片展示代码。

使用方法

1、head引入css文件

<!--图标库-->
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.min.css'>

<!--主要样式-->
<link rel="stylesheet" href="css/style.css">

3、body引入部分

<div class="carousel">
	<div class="btn btn-back hidden">
		<i class="fas fa-arrow-left"></i>
		<i class="fas fa-chevron-left left-indicator"></i>
	</div>
	<div class="viewbox">
		<div class="track">
			<div class="slide active">
				<img class="images" src="img/1.jpg" />
			</div>
			<div class="slide">
				<img class="images" src="img/2.jpg" />
			</div>
			<div class="slide">
				<img class="images" src="img/3.jpg" />
			</div>
			<div class="slide">
				<img class="images" src="img/4.jpg" />
			</div>
			<div class="slide active">
				<img class="images" src="img/5.jpg" />
			</div>
			<div class="slide">
				<img class="images" src="img/6.jpg" />
			</div>
			<div class="slide">
				<img class="images" src="img/7.jpg" />
			</div>
			<div class="slide">
				<img class="images" src="img/8.jpg" />
			</div>
		</div>
	</div>
	<div class="btn btn-next">
		<i class="fas fa-arrow-right"></i>
		<i class="fas fa-chevron-right right-indicator"></i>
	</div>
	<div class="nav-indicator">
		<div class="dot active"></div>
		<div class="dot"></div>
		<div class="dot"></div>
		<div class="dot"></div>
		<div class="dot"></div>
		<div class="dot"></div>
		<div class="dot"></div>
		<div class="dot"></div>
	</div>
</div>


<script src='js/TimelineMax.min.js'></script>
<script src='js/TweenMax.min.js'></script>
<script src="js/script.js"></script>

资源出处:https://www.moyublog.com/codes/6946.html

关注微信