jQuery玻璃流光质感手风琴特效



108 430 144



特效描述:jQuery 玻璃流光质感 手风琴特效,jQuery玻璃流光质感手风琴特效

代码结构

1. 引入CSS

<link rel="stylesheet" type="text/css" href="css/default.css">
<link rel='stylesheet prefetch' href='http://libs.useso.com/js/font-awesome/4.2.0/css/font-awesome.min.css'>
<link rel="stylesheet" type="text/css" href="css/styles.css">

2. 引入JS

<script src="js/jquery-1.8.3.min.js" type="text/javascript"></script>

3. HTML代码

<section class="strips">
  <article class="strips__strip">
	<div class="strip__content">
	  <h1 class="strip__title" data-name="Lorem">Awesome</h1>
	</div>
  </article>
  <article class="strips__strip">
	<div class="strip__content">
	  <h1 class="strip__title" data-name="Ipsum">Words</h1>
		<p>
		  <a href="#" target="_blank"><i class="fa fa-qq"></i></a>
		</p>
	  </div>
	</div>
  </article>
  <article class="strips__strip">
	<div class="strip__content">
	  <h1 class="strip__title" data-name="Dolor">Go</h1>
	  <div class="strip__inner-text">
		<h2>Ettrics</h2>
		<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Officia sapiente deserunt consectetur, quod reiciendis corrupti quo ea aliquid! Repellendus numquam quo, voluptate. Suscipit soluta omnis quibusdam facilis, illo voluptates odit!</p>
		<p>
		  <a href="#" target="_blank"><i class="fa fa-weibo"></i></a>
		</p>
	  </div>
	</div>
  </article>
  <article class="strips__strip">
	<div class="strip__content">
	  <h1 class="strip__title" data-name="Sit">Inside</h1>
	  <div class="strip__inner-text">
		<h2>Ettrics</h2>
		<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Officia sapiente deserunt consectetur, quod reiciendis corrupti quo ea aliquid! Repellendus numquam quo, voluptate. Suscipit soluta omnis quibusdam facilis, illo voluptates odit!</p>
		<p>
		  <a href="#" target="_blank"><i class="fa fa-weixin"></i></a>
		</p>
	  </div>
	</div>
  </article>
  <article class="strips__strip">
	<div class="strip__content">
	  <h1 class="strip__title" data-name="Amet">Here</h1>
	  <div class="strip__inner-text">
		<h2>Ettrics</h2>
		<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Officia sapiente deserunt consectetur, quod reiciendis corrupti quo ea aliquid! Repellendus numquam quo, voluptate. Suscipit soluta omnis quibusdam facilis, illo voluptates odit!</p>
		<p>
		  <a href="#" target="_blank"><i class="fa fa-leaf"></i></a>
		</p>
	  </div>
	</div>
  </article>
  <i class="fa fa-close strip__close"></i>
</section>
<script>
var Expand = function () {
	var tile = $('.strips__strip');
	var tileLink = $('.strips__strip > .strip__content');
	var tileText = tileLink.find('.strip__inner-text');
	var stripClose = $('.strip__close');
	var expanded = false;
	var open = function () {
		var tile = $(this).parent();
		if (!expanded) {
			tile.addClass('strips__strip--expanded');
			tileText.css('transition', 'all .6s 1s cubic-bezier(0.23, 1, 0.32, 1)');
			stripClose.addClass('strip__close--show');
			stripClose.css('transition', 'all .6s 1s cubic-bezier(0.23, 1, 0.32, 1)');
			expanded = true;
		}
	};
	var close = function () {
		if (expanded) {
			tile.removeClass('strips__strip--expanded');
			tileText.css('transition', 'all 0.15s 0 cubic-bezier(0.23, 1, 0.32, 1)');
			stripClose.removeClass('strip__close--show');
			stripClose.css('transition', 'all 0.2s 0s cubic-bezier(0.23, 1, 0.32, 1)');
			expanded = false;
		}
	};
	var bindActions = function () {
		tileLink.on('click', open);
		stripClose.on('click', close);
	};
	var init = function () {
		bindActions();
	};
	return { init: init };
}();
Expand.init();
</script>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 滚动切换 滚动条切换 滑动选项卡 滑动切换 浮动 悬浮 悬浮层 悬浮框 浮动层 浮动框 浮动插件 悬浮插件 选项卡切换 选项卡 切换 tab切换 页面切换 选项卡插件 切换插件 滑动手风琴 收缩展开 展开收缩 收缩 展开 浮动提示框 图片广告 图片收缩展开 图片收缩 图片展开 手风琴 水平手风琴 垂直手风琴 图片手风琴 文字手风琴 手风琴插件

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到