拉萨手风琴

<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>拉萨手风琴</title>
  <style>
	*{
		margin: 0;
	}
	body{
		background-image: url(../images/6.jpg);
		background-repeat: no-repeat;
		background-size: cover;
	}
	.piclists{
		width: 1089px;
		height: 429px;
		background-color: #8392e2;
		margin: 100px auto;
	}
	.piclists ul{
		list-style: none;
		padding: 0;
		height: 100%;
	}
	.list{
		float: left;
		width: 100px;
		height: 429px;
		background-color: #ff9999;
		background-image: url(../images/3.jpg);
	}
	.list:nth-child(2){
		background-image: url(../images/4.jpg);
	}
	.list:nth-of-type(3){
		background-image: url(../images/5.jpg);
	}
	.list:nth-of-type(4){
		width: 789px;
		background-image: url(../images/6.jpg);
	}
	.list div{
		width: 100px;
		height: 429px;
		background-color: rgba(0,0,0,0.5);
	}
	.list div p{
		padding: 43px;
		color: #ffffff;
	}
  </style>
 </head>
 <body>
	<div class="piclists">
		<ul>
			<li class="list">
				<div>
					<p>我的个人拉萨之旅 | | 故事之城</p>
				</div>
			</li>
			<li class="list">
				<div>
					<p>我的个人拉萨之旅 | | 故事之城</p>
				</div>
			</li>
			<li class="list">
				<div>
					<p>我的个人拉萨之旅 | | 故事之城</p>
				</div>
			</li>
			<li class="list">
				<div>
					<p>我的个人拉萨之旅 | | 故事之城</p>
				</div> 
			</li>
		</ul>
	</div>
	<script src="../js/jquery-1.11.1.min.js"></script>
	<!--script src="../js/tab.js"></script-->
	<script>
		(function($){
			$.fn.tab = function(option){
				var bgNode = option.bg;
				var eventNode = option.el;
				var imgArr = option.bgImg;
			   $(eventNode).click(function(){
					var index = $(this).index();
					$(this).stop().animate({
						width: "789px"
					},500).siblings().stop().animate({	
						width: "100px"
					},500);
					$(bgNode).css({
						backgroundImage:"url("+imgArr[index]+")"
					});
				})	
			}
		})($)
		$.fn.tab({
			el:".list",
			bg:"body",
			bgImg: ["../images/3.jpg","../images/4.jpg",
			"../images/5.jpg","../images/6.jpg"]
		});
	</script>
 </body>
</html>

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值