jQuery基于css3屬性制作多張圖片層疊,通過按鈕控制上下一張卡片切換效果。這是一款不錯的ui圖片展示特效。
使用方法:
1、head引入css文件
<link rel="stylesheet" href="css/style.css">
2、body引入部分
<div class="container">
<div class="card-stack">
<a class="buttons prev" href="#"><</a>
<ul class="card-list">
<li class="card" style="background: #c31432; /* fallback for old browsers */
background: -webkit-linear-gradient(to right, #240b36, #c31432); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #240b36, #c31432); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
">
<img src="svg/E90.svg" alt="Sun" class="card-list__image">
<h3 class="card-list__text">當(dāng)你超越競爭對手時,注意你的成功之路。 </h3>
</li>
<li class="card" style="background: #00416A;
background: -webkit-linear-gradient(to right, #FFE000, #799F0C, #00416A);
background: linear-gradient(to right, #FFE000, #799F0C, #00416A);
">
<img src="svg/E9H.svg" alt="Sun" class="card-list__image">
<h3 class="card-list__text">放松點,冷靜點,我們已經(jīng)為你蓋好了。 </h3>
</li>
<li class="card" style="background: #1e3c72;
background: -webkit-linear-gradient(to right, #2a5298, #1e3c72);
background: linear-gradient(to right, #2a5298, #1e3c72);
">
<img src="svg/E86.svg" alt="Sun" class="card-list__image">
<h3 class="card-list__text">提升你的社交網(wǎng)絡(luò)形象</h3>
</li>
<li class="card" style="background: #2C3E50;
background: -webkit-linear-gradient(to right, #FD746C, #2C3E50);
background: linear-gradient(to right, #FD746C, #2C3E50);
">
<img src="svg/E8Y.svg" alt="Sun" class="card-list__image">
<h3 class="card-list__text">在競爭對手中名列前茅</h3>
</li>
<li class="card" style="background: #373B44;
background: -webkit-linear-gradient(to right, #4286f4, #373B44);
background: linear-gradient(to right, #4286f4, #373B44);
">
<img src="svg/E9z.svg" alt="Sun" class="card-list__image">
<h3 class="card-list__text">為在線課程創(chuàng)建內(nèi)容</h3>
</li>
</ul>
<a class="buttons next" href="#">></a>
</div>
</div>
<script type="text/javascript" src='js/jquery.min.js'></script>
<script type="text/javascript" src="js/script.js"></script>