首页 前端知识 JS特效第107弹:jQuery css3相册图片叠加堆放展开动画特效

JS特效第107弹:jQuery css3相册图片叠加堆放展开动画特效

2024-02-24 15:02:00 前端知识 前端哥 730 977 我要收藏

         一款非常有创意的jQuery+css3相册图片叠加堆放展开动画特效,图片层叠放置布局效果,点击图片滑动展开,点击展开的图片点击则会滑动收缩起来。一款非常有创意的jQuery+css3相册图片叠加堆放展开动画特效,图片层叠放置布局效果,点击图片滑动展开,点击展开的图片点击则会滑动收缩起来,先来看看效果:

        一部分关键的代码如下:

<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>jQuery+css3相册图片叠加堆放展开动画特效</title>

<link rel="stylesheet" type="text/css" href="css/styles.css">

</head>
<body><script src="/demos/googlegg.js"></script>

<ul class="cards">
	  <li class="title">
		<h2>Slide right</h2>
	  </li>
	  <li class="card card-1"><img src="img/01.jpg">
		<div class="content">
		  <h1>Card 1 Title</h1>
		  <p>Card description</p>
		</div>
	  </li>
	  <li class="card card-2"><img src="img/02.jpg">
		<div class="content">
		  <h1>Card 2 Title</h1>
		  <p>Card description</p>
		</div>
	  </li>
	  <li class="card card-3"><img src="img/03.jpg">
		<div class="content">
		  <h1>Card 3 Title</h1>
		  <p>Card description</p>
		</div>
	  </li>
	</ul>
	<hr/>
	<ul class="card-stacks">
	  <li class="title">
		<h2>Expand to grid</h2>
	  </li>
	  <li class="stack stack-1">
		<ul class="cards-down">
		  <li class="card card-1"><img src="img/04.jpg">
			<div class="content">
			  <h1>Card 1 Title</h1>
			  <p>Stack 1</p>
			</div>
		  </li>
		  <li class="card card-2"><img src="img/05.jpg">
			<div class="content">
			  <h1>Card 2 Title</h1>
			  <p>Stack 1</p>
			</div>
		  </li>
		  <li class="card card-3"><img src="img/06.jpg">
			<div class="content">
			  <h1>Card 3 Title</h1>
			  <p>Stack 1</p>
			</div>
		  </li>
		</ul>
	  </li>
	  <li class="stack stack-2">
		<ul class="cards-down">
		  <li class="card card-1"><img src="img/07.jpg">
			<div class="content">
			  <h1>Card 1 Title</h1>
			  <p>Stack 2</p>
			</div>
		  </li>
		  <li class="card card-2"><img src="img/08.jpg">
			<div class="content">
			  <h1>Card 2 Title</h1>
			  <p>Stack 2</p>
			</div>
		  </li>
		  <li class="card card-3"><img src="img/01.jpg">
			<div class="content">
			  <h1>Card 3 Title</h1>
			  <p>Stack 2</p>
			</div>
		  </li>
		</ul>
	  </li>
	  <li class="stack stack-3">
		<ul class="cards-down">
		  <li class="card card-1"><img src="img/06.jpg">
			<div class="content">
			  <h1>Card 1 Title</h1>
			  <p>Stack 3</p>
			</div>
		  </li>
		  <li class="card card-2"><img src="img/02.jpg">
			<div class="content">
			  <h1>Card 2 Title</h1>
			  <p>Stack 3</p>
			</div>
		  </li>
		  <li class="card card-3"><img src="img/03.jpg">
			<div class="content">
			  <h1>Card 3 Title</h1>
			  <p>Stack 3</p>
			</div>
		  </li>
		</ul>
	  </li>
	</ul>
	<hr/>
	<ul class="cards-split">
	  <li class="title">
		<h2>Split from middle</h2>
	  </li>
	  <li class="card card-1"><img src="img/02.jpg">
		<div class="content">
		  <h1>Card 1 Title</h1>
		  <p>Card description</p>
		</div>
	  </li>
	  <li class="card card-2"><img src="img/04.jpg">
		<div class="content">
		  <h1>Card 2 Title</h1>
		  <p>Card description</p>
		</div>
	  </li>
	  <li class="card card-3"><img src="img/06.jpg">
		<div class="content">
		  <h1>Card 3 Title</h1>
		  <p>Card description</p>
		</div>
	  </li>
	</ul>
	<hr/>
	<ul class="cards-split-delay">
	  <li class="title">
		<h2>Delayed split from middle</h2>
	  </li>
	  <li class="card card-1"><img src="img/01.jpg">
		<div class="content">
		  <h1>Card 1 Title</h1>
		  <p>Card description</p>
		</div>
	  </li>
	  <li class="card card-2"><img src="img/05.jpg">
		<div class="content">
		  <h1>Card 2 Title</h1>
		  <p>Card description</p>
		</div>
	  </li>
	  <li class="card card-3"><img src="img/08.jpg">
		<div class="content">
		  <h1>Card 3 Title</h1>
		  <p>Card description</p>
		</div>
	  </li>
	</ul>

<script type="text/javascript" src='js/jquery-1.10.2.min.js'></script>
<script type="text/javascript">
jQuery(document).ready(function ($) {
$('ul.cards').on('click', function () {
	$(this).toggleClass('transition');
});
$('ul.card-stacks').on('click', function () {
	$(this).toggleClass('transition');
});
$('ul.cards-split').on('click', function () {
	$(this).toggleClass('transition');
});
$('ul.cards-split-delay').on('click', function () {
	$(this).toggleClass('transition');
});
});
</script>

<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
<p>适用浏览器:360、FireFox、Chrome、Opera、傲游、搜狗、世界之窗. 不支持Safari、IE8及以下浏览器。</p>
<p>来源:<a href="http://www.lanrenzhijia.com/" target="_blank">懒人</a></p>
</div>
</body>
</html>

        全部代码:jQuery+css3相册图片叠加堆放展开动画特效

转载请注明出处或者链接地址:https://www.qianduange.cn//article/2634.html
标签
评论
发布的文章

【jQuery详细介绍】

2024-03-10 11:03:26

jQuery核心函数

2024-03-10 11:03:10

vue echarts GL3d中国地图

2024-03-10 11:03:09

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!