jQuery玻璃流光質感手風琴特效



116 460 154



特效描述: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

加群請備注:從官網了解到

老夫子电子