jQuery卡通人物介绍卡牌轮播切换代码



154 615 206



特效描述:jQuery 卡通人物介绍 卡牌轮播切换,jQuery卡通人物介绍卡牌轮播切换代码

代码结构

1. 引入CSS

<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel='stylesheet prefetch' href='css/slick.css'>
<link rel='stylesheet prefetch' href='css/slick-theme.css'>
<link rel="stylesheet" href="css/style.css">

2. 引入JS

<script src="js/jquery-2.1.1.min.js" type="text/javascript"></script>
<script src='js/slick.min.js'></script>

3. HTML代码

<div class="slide-container">
  <div class="wrapper">
	<div class="clash-card barbarian">
	  <div class="clash-card__image clash-card__image--barbarian">
		<img src="img/barbarian.png" alt="barbarian" />
	  </div>
	  <div class="clash-card__level clash-card__level--barbarian">Level 4</div>
	  <div class="clash-card__unit-name">The Barbarian</div>
	  <div class="clash-card__unit-description">
		The Barbarian is a kilt-clad Scottish warrior with an angry, battle-ready expression, hungry for destruction. He has Killer yellow horseshoe mustache.
	  </div>
	  <div class="clash-card__unit-stats clash-card__unit-stats--barbarian clearfix">
		<div class="one-third">
		  <div class="stat">20<sup>S</sup></div>
		  <div class="stat-value">Training</div>
		</div>
		<div class="one-third">
		  <div class="stat">16</div>
		  <div class="stat-value">Speed</div>
		</div>
		<div class="one-third no-border">
		  <div class="stat">150</div>
		  <div class="stat-value">Cost</div>
		</div>
	  </div>
	</div> <!-- end clash-card barbarian-->
  </div> <!-- end wrapper -->
  <div class="wrapper">
	<div class="clash-card archer">
	  <div class="clash-card__image clash-card__image--archer">
		<img src="img/archer.png" alt="archer" />
	  </div>
	  <div class="clash-card__level clash-card__level--archer">Level 5</div>
	  <div class="clash-card__unit-name">The Archer</div>
	  <div class="clash-card__unit-description">
		The Archer is a female warrior with sharp eyes. She wears a short, light green dress, a hooded cape, a leather belt and an attached small pouch.
	  </div>
	  <div class="clash-card__unit-stats clash-card__unit-stats--archer clearfix">
		<div class="one-third">
		  <div class="stat">25<sup>S</sup></div>
		  <div class="stat-value">Training</div>
		</div>
		<div class="one-third">
		  <div class="stat">24</div>
		  <div class="stat-value">Speed</div>
		</div>
		<div class="one-third no-border">
		  <div class="stat">300</div>
		  <div class="stat-value">Cost</div>
		</div>
	  </div>
	</div> <!-- end clash-card archer-->
  </div> <!-- end wrapper -->
  <div class="wrapper">
	<div class="clash-card giant">
	  <div class="clash-card__image clash-card__image--giant">
		<img src="img/giant.png" alt="giant" />
	  </div>
	  <div class="clash-card__level clash-card__level--giant">Level 5</div>
	  <div class="clash-card__unit-name">The Giant</div>
	  <div class="clash-card__unit-description">
		Slow, steady and powerful, Giants are massive warriors that soak up huge amounts of damage. Show them a turret or cannon and you'll see their fury unleashed!
	  </div>
	  <div class="clash-card__unit-stats clash-card__unit-stats--giant clearfix">
		<div class="one-third">
		  <div class="stat">2<sup>M</sup></div>
		  <div class="stat-value">Training</div>
		</div>
		<div class="one-third">
		  <div class="stat">12</div>
		  <div class="stat-value">Speed</div>
		</div>
		<div class="one-third no-border">
		  <div class="stat">2250</div>
		  <div class="stat-value">Cost</div>
		</div>
	  </div>
	</div> <!-- end clash-card giant-->
  </div> <!-- end wrapper -->
   <div class="wrapper">
	<div class="clash-card goblin">
	  <div class="clash-card__image clash-card__image--goblin">
		<img src="img/goblin.png" alt="goblin" />
	  </div>
	  <div class="clash-card__level clash-card__level--goblin">Level 5</div>
	  <div class="clash-card__unit-name">The Goblin</div>
	  <div class="clash-card__unit-description">
		These pesky little creatures only have eyes for one thing: LOOT! They are faster than a Spring Trap, and their hunger for resources is limitless.
	  </div>
	  <div class="clash-card__unit-stats clash-card__unit-stats--goblin clearfix">
		<div class="one-third">
		  <div class="stat">30<sup>S</sup></div>
		  <div class="stat-value">Training</div>
		</div>
		<div class="one-third">
		  <div class="stat">32</div>
		  <div class="stat-value">Speed</div>
		</div>
		<div class="one-third no-border">
		  <div class="stat">100</div>
		  <div class="stat-value">Cost</div>
		</div>
	  </div>
	</div> <!-- end clash-card goblin-->
  </div> <!-- end wrapper -->
  <div class="wrapper">
	<div class="clash-card wizard">
	  <div class="clash-card__image clash-card__image--wizard">
		<img src="img/wizard.png" alt="wizard" />
	  </div>
	  <div class="clash-card__level clash-card__level--wizard">Level 6</div>
	  <div class="clash-card__unit-name">The Wizard</div>
	  <div class="clash-card__unit-description">
		The Wizard is a terrifying presence on the battlefield. Pair him up with some of his fellows and cast concentrated blasts of destruction on anything, land or sky!
	  </div>
	  <div class="clash-card__unit-stats clash-card__unit-stats--wizard clearfix">
		<div class="one-third">
		  <div class="stat">5<sup>M</sup></div>
		  <div class="stat-value">Training</div>
		</div>
		<div class="one-third">
		  <div class="stat">16</div>
		  <div class="stat-value">Speed</div>
		</div>
		<div class="one-third no-border">
		  <div class="stat">4000</div>
		  <div class="stat-value">Cost</div>
		</div>
	  </div>
	</div> <!-- end clash-card wizard-->
  </div> <!-- end wrapper -->
</div> <!-- end container -->
<script type="text/javascript">
	(function() {
	  var slideContainer = $('.slide-container');
	  slideContainer.slick();
	  $('.clash-card__image img').hide();
	  $('.slick-active').find('.clash-card img').fadeIn(200);
	  // On before slide change
	  slideContainer.on('beforeChange', function(event, slick, currentSlide, nextSlide) {
		$('.slick-active').find('.clash-card img').fadeOut(1000);
	  });
	  // On after slide change
	  slideContainer.on('afterChange', function(event, slick, currentSlide) {
		$('.slick-active').find('.clash-card img').fadeIn(200);
	  });
	})();
</script>



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


热门标签: 文字叠加 文字层叠 图片放大镜 图片叠加 图片层叠 图片翻转 图片旋转 图片拖动 图片拖拽 图片延迟加载 图片延迟 图片加载 图片淡出淡进 图片淡出 图片淡进 图片全屏 二维码 头像上传 图片上传 文字淡出淡进 文字淡出 文字淡进 地图 中国地图 世界地图 文字放大缩小 文字缩放 文字大小 文字放大 文字缩小 文字变大 文字变小 图片放大缩小 图片缩放 图片大小 图片放大 图片缩小 图片变大 图片变小 带缩略图的幻灯片 文字收缩展开 文字收缩 文字展开 文字翻转 文字旋转 h5图片动画 h5图标动画 html5图片动画 html5图标动画 文字全屏 文字延迟加载 文字延迟 文字加载 滚动切换 滚动条切换 文字提示框 提示文字 文字拖动 文字拖拽 滑动选项卡 滑动切换 图片广告 图片滚动 图片滚动条 360全景 360度全景 图片收缩展开 图片收缩 图片展开 h5文字动画 h5文字边框动画 html5文字动画 html5文字边框动画 纯图片轮播 图片轮播 图片滑动 图片滑块 旋转木马 图片旋转木马 文字旋转木马 旋转木马插件 图片切换 图片选项卡 图标选项卡 文字滑动 文字滑块 文字滚动 文字无缝滚动 文字间歇滚动 图标导航 图标菜单 自动滚动图片轮播 文字切换 文字选项卡 滑动手风琴 背景切换 大图切换 选项卡切换 选项卡 切换 tab切换 页面切换 选项卡插件 切换插件 手风琴 水平手风琴 垂直手风琴 图片手风琴 文字手风琴 手风琴插件 文字导航菜单 文字导航 文字菜单 图片文字 切换按钮 表单 表单美化 表单插件 表单美化插件 图表 文字 文字插件 图片 图片插件 头像截图 图片切换 图片选项卡 图标选项卡 文字列表 渐隐切换 图片切换 切换图片 按钮控制

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

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

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