携程网手机端网页样式
博客专区 > 爱虎 的博客 > 博客详情
携程网手机端网页样式
爱虎 发表于6个月前
携程网手机端网页样式
  • 发表于 6个月前
  • 阅读 0
  • 收藏 0
  • 点赞 0
  • 评论 0

腾讯云 十分钟定制你的第一个小程序>>>   

** HTML部分`**

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no" id="viewport" />
	<title>携程在手 说走就走</title>
	<link rel="stylesheet" href="css/reset.css">
	<link rel="stylesheet" href="css/index.css">
</head>
<body>
	<header>
		<div class="search">
			<span>搜索:目的地/景点/航班号</span>
		</div>
		<a href="#" class="login">我的</a>
	</header>
	<section class="banner">
		<img src="images/banner.jpg" alt="">
	</section>
	<nav>
		<ul>
			<li><a href="">酒店</a></li>
			<li><a href="">海外酒店</a></li>
			<li><a href="">团购</a></li>
			<li><a href="">特价酒店</a></li>
			<li><a href="">民宿·客栈</a></li>
		</ul>
		<ul>
			<li><a href="">机票</a></li>
			<li><a href="">火车篇·抢票</a></li>
			<li><a href="">汽车票·船票</a></li>
			<li><a href="">特价机票</a></li>
			<li><a href="">专车·租车</a></li>
		</ul>
		<ul>
			<li><a href="">旅游</a></li>
			<li><a href="">目的地攻略</a></li>
			<li><a href="">邮轮</a></li>
			<li><a href="">周边游</a></li>
			<li><a href="">定制旅行</a></li>
		</ul>
		<ul>
			<li><a href="">景点·玩乐</a></li>
			<li><a href="">美食林</a></li>
			<li><a href="">全球购·换汇</a></li>
			<li><a href="">礼品卡</a></li>
			<li><a href="">WiFi电话卡</a></li>
			<li><a href="">体验签证</a></li>
		</ul>
	</nav>
	<section class="subnav">
		<ul>
				<li><a href="">自由行</a></li>
				<li><a href="">微领队</a></li>
				<li><a href="">一日游</a></li>
				<li><a href="">高端游</a></li>
				<li><a href="">酒店+景点</a></li>
				<li><a href="">亲子·游学</a></li>
				<li><a href="">外币兑换</a></li>
				<li><a href="">加盟合作</a></li>
				<li><a href="">机场停车</a></li>
				<li><a href="">行李寄送</a></li>
				<li><a href="">当季去哪</a></li>
				<li><a href="">更多服务</a></li>
			</ul>
	</section>
	<section class="sale">
		<div class="top">
			<h3>特卖汇</h3>
			<span>领红包再下单</span>
		</div>
		<div class="sale_bd">
			<div class="sale_left">
				<span class="hot">爆款</span>
				<img src="images/33.jpg" alt="">
				<p class="guilin">广西桂林4月3日晚自由行(5钻)·5星桂	林漓江大瀑布酒店3晚,含双早+双飞</p>
				<p class="price">
					<span class="price1"><i>¥</i>1999<b>起</b></span>
					<span class="price2">省¥491</span>
				</p>
			</div>
			<div class="sale_right">
				<div class="right_box1">
					<p>欠款特价</p>
					<p>走过路过不错过</p>
				</div>
				<div class="right_box2">
					<p>海外精选</p>
					<p><i>百元</i>出境游</p>
				</div>
				<div class="right_box3">
					<p>周边玩乐</p>
					<p><i>十元</i>度周末</p>
				</div>
			</div>
		</div>
	</section>
	<section class="activity">
		<div class="topac">
			<h3>热门活动</h3>
			<span>领红包再下单</span>
		</div>
		<div class="contentac">
			<ul>
				<li><img src="images/ad1_2.jpg" alt=""></li>
				<li><img src="images/ad2.jpg" alt=""></li>
				<li><img src="images/ad3.jpg" alt=""></li>
				<li><img src="images/ad4.jpg" alt=""></li>
				<li><img src="images/ad5.jpg" alt=""></li>
			</ul>
		</div>
	</section>
	<footer>
		<ul>
			<li><a href="">电话预订</a></li>
			<li><a href="">下载客户端</a></li>
			<li><a href="">我的</a></li>
		</ul>
	</footer>
	<div class="footerbar">
		<p class="bar">
			<a href="" class="map">网站地图</a>
			<a href="" class="global"><span></span>Global sites <i></i></a>
			<a href="" class="comp">电脑版</a>
		</p>
		<p class="copy"><a href="">©2017携程旅行</a></p>
	</div>
</body>
</html>

CSS部分

/*header部分开始*/
body{
	min-width: 320px;
	max-width: 540px;
	height: 1400px;
	background: #f2f2f2;
}
header{
	width:100%;
	min-width:320px;
	max-width:540px;
	padding:7px 50px 10px 8px;
	position: fixed;
	left:50%;
	top:0;
	transform:translateX(-50%);
	height:45px;
	box-sizing:border-box;
	border-top:1px solid #ccc;
	border-bottom:1px solid #ccc;
	background: #f6f6f6;
	z-index: 4;
}
header .search{
	width: 100%;
	height:26px;
	border:1px solid #9a9a9a;
	box-shadow:1px 1px 2px rgba(0,0,0,.3);
	border-radius:6px;
	background: #fff;
	padding-left: 25px;
	font-size:12px;
	line-height: 24px;
	color:#868686;
	box-sizing:border-box;
	position: relative;
}
header .search::before{
	content:"";
	width:13px;
	height:13px;
	position: absolute;
	left:8px;
	top:7px;
	background:url(../images/icon.png) no-repeat -60px -280px;
	background-size: 104px 327.5px;
}
header .login{
	position: absolute;
	width:50px;
	height:43px;
	right:0;
	top:0;
	color:#3cb1dd;
	font-size:12px;
	line-height: 65px;
	text-align: center;
	text-decoration: none;
}
header .login::before{
	content:"";
	position: absolute;
	left:13px;
	top:4px;
	width: 23px;
	height:23px;
	background: url(../images/icon.png) no-repeat -59.5px -194.5px;
	background-size: 104px 327.5px;
}
.banner{
	width: 100%;
	height: 107px;
	border-top: 1px solid #cbcdcc;
	margin-top: 10px;
}
.banner img{
	width: 100%;
	height: 107px;
}
nav{
	width: 100%;
	background: #f2f2f2;
	margin: 6px auto 0;
	padding: 0 4px;
	box-sizing:border-box;
}
nav ul{
	width: 100%;
	height: 90px;
	border-radius: 5px;
	background: #ff697a;
	overflow: hidden;
	margin-bottom: 4px;
}
nav ul:nth-child(2){
	background: #3d99ff;
}
nav ul:nth-child(3){
	background: #44c522;
}
nav ul:nth-child(4){
	background: #fc9721;
}
nav ul li{
	width: 33.33%;
	height: 45px;
	float: left;
	box-sizing:border-box;
	position: relative;
}
nav ul li:first-child{
	height: 90px;
	border-right: 1px solid #fff;
}
nav ul li:nth-child(2),nav ul li:nth-child(4){
	border-right: 1px solid #fff;
}
nav ul li:nth-child(2),nav ul li:nth-child(3){
	border-bottom: 1px solid #fff;
}
nav ul li a{
	display: block;
	line-height: 45px;
	text-align: center;
	text-decoration: none;
	font-size: 12px;
	color: #fff;
}
nav li:first-child a::after{
	content: "";
	position: absolute;
	width: 40px;
	height: 33px;
	left: 50%;
	margin-left: -20px;
	top: 45px;
	background: url(../images/icon.png) no-repeat 0 -130px;
	background-size: 104px 327.5px;
}
nav ul:nth-child(2) li:first-child a::after{
	width: 43px;
	height: 24px;
	top:52px;
	background: url(../images/icon.png) no-repeat 0 -296px;
	background-size: 104px 327.5px;
}
nav ul:nth-child(3) li:first-child a::after{
	width: 34px;
	height: 41px;
	left: 50%;
	margin-left: -17px;
	top: 40px;
	background: url(../images/icon.png) no-repeat 0 -181px;
	background-size: 104px 327.5px;
}
nav ul:nth-child(4) li:first-child{
	height: 45px;
}
nav ul:nth-child(4) li:first-child{
	border-bottom: 1px solid #fff;
}
nav ul:nth-child(4) li:nth-child(5){
	border-right: 1px solid #fff;
}
nav ul:nth-child(4) li:first-child a::after{
	background-image: none;
}
/*subnav部分开始*/
.subnav{
	width: 100%;
	padding: 0 4px;
	margin-top: 5px;
	box-sizing:border-box;
}
.subnav ul{
	overflow: hidden;
	width: 100%;
	/*height: 172px;*/
	background: #fff;
	border-top-left-radius: 5px;
	border-top-right-radius: 5px;
}
.subnav ul li{
	float: left;
	width: 25%;
	height: 60px;
	border-right: 1px solid #eee;
	border-bottom: 1px solid #eee;
	box-sizing:border-box;
	position: relative;
}
.subnav ul li:nth-child(4n){
	border-right: none;
}
.subnav ul li a{
	display: block;
	text-decoration: none;
	line-height: 85px;
	text-align: center;
	color: #000;
	font-size: 12px;
}
.subnav ul li a::before{
	content: "";
	position: absolute;
	width: 20px;
	height: 20px;
	top: 12px;
	transform:translateX(50%);
	background: url(../images/un_ico_subnav@2x.png) no-repeat 0 -80px;
	background-size: 20px 245px;

}
.subnav ul li:nth-child(3) a::before{
	background-position: 0 -120px;
}
.subnav ul li:nth-child(4) a::before{
	background-position: 0 -140px;
}
.subnav ul li:nth-child(5) a::before{
	transform:translateX(100%);
	background-position: 0 -160px;

}
.subnav ul li:nth-child(6) a::before{
	transform:translateX(100%);
	background-position: 0 -181px;
}
.subnav ul li:nth-child(7) a::before{
	transform:translateX(100%);
	background-position: 0 -200px;
}
.subnav ul li:nth-child(8) a::before{
	transform:translateX(100%);
	background-position: 0 -220px;
}
.subnav ul li:nth-child(9) a::before{
	transform:translateX(100%);
	background-position: 0 -20px;
}
.subnav ul li:nth-child(10) a::before{
	transform:translateX(100%);
	background-position: 0 -40px;
}
.subnav ul li:nth-child(11) a::before{
	transform:translateX(100%);
	background-position: 0 -60px;
}
.subnav ul li:nth-child(12) a::before{
	transform:translateX(100%);
	background-position: 0 -80px;
}
/*特卖汇部分*/
.sale{
	width: 100%;
	height: 263px;
	margin: 8px auto;
	padding:12px 8px 13px 8px;
	background-color: #fff;
	box-sizing:border-box;
}
.sale .top{
	width: 100%;
	height: 33px;
	position: relative;
}
.sale .top h3{
	padding-top: 4px;
	width: 56px;
	height: 15px;
	text-indent: -888px;
	background: url(../images/un_home_text.png) no-repeat;
	background-size: 79px 57.5px;
	overflow: hidden;
}
.sale .top span{
	position: absolute;
	width: 90px;
	padding-left: 12px;
	height: 20px;
	line-height: 20px;
	font-size: 12px;
	background-image: -webkit-linear-gradient(left,#ff4e64,#ff6bc5);
	border-radius: 10px;
	color: #fff;
	right: 8px;
	top: -4px;
}
.sale .top span::after{
	content: "";
	position: absolute;
	width: 7px;
	height: 7px;
	right: 8px;
	top: 6px;
	border-top: 2px solid #fff;
	border-right: 2px solid #fff;
	transform:rotate(45deg);
}
/*爆款部分*/
.sale .sale_left{
	width: 50%;
	height: 205px;
	box-sizing:border-box;
	background: #f9f9f9;
	border-right: 1px solid #fff;
	position: relative;
	float: left;
}
.sale .sale_left img{
	width: 100%;
}
.sale .sale_left span.hot{
	position: absolute;
	top: 0;
	left: 0;
	width:38px;
	height: 20px;
	background: #fd394f; 
	color: #fff;
	font-size: 12px;
	text-align: center;
}
/*用斜切和定位做出三角的效果*/
.sale .sale_left span.hot::after{
	content: "";
	position: absolute;
	top: 0;
	left: 34px;
	width:8px;
	height: 20px;
	background: #fd394f;
	transform:skew(-20deg);
}
.sale .sale_bd{
	overflow: hidden;
}
.sale .sale_bd .sale_left{
	float: left;
	border-right: 2px solid #fff;
}
.sale .sale_bd .sale_left .guilin{
	padding:8px 7px 0px 8px;
	font-size: 12px;
	line-height: 21px;
	color: #000;
	-webkit-line-clamp:2;
	display:-webkit-box;
	-webkit-box-orient:vertical;
	text-overflow:ellipsis;
	overflow: hidden;
}
.sale .sale_bd .sale_left .price{
	padding-top: 5px;
	padding-left: 8px;
	overflow: hidden;

}
.sale .sale_bd .sale_left .price1{
	width: 65px;
	font-size: 14px;
	color: #fe485f;	
	font-weight: bold;
	float: left;

} 
.sale .sale_bd .sale_left .price1 i{
	font-style: normal;
	font-size: 8px;
}
.sale .sale_bd .sale_left .price2{
	display: block;
	float: left;
	margin-top: 3px;
	width: 53px;
	height: 14px;
	background: #ff3950;
	font-size: 12px;
	line-height: 14px;
	border-radius: 5px;
	color: #fff;
	text-align: center;
}
/*爆款的右边部分*/
.sale .sale_bd .sale_right{
	float: left;
	width: 50%;
}
.sale .sale_bd .sale_right .right_box1{
 	float: left;
 	width: 100%;
 	height: 88px;
 	box-sizing:border-box;
 	border-bottom: 4px solid #fff;
	background: #f9f9f9;
	position: relative;
 }
 .sale .sale_bd .sale_right .right_box1 p:first-child{
 	padding-left: 6px;
 	padding-top: 10px;
 	font-size: 12px;
 	font-weight: bold;
 	color: #fc3b4e;
 }
 .sale .sale_bd .sale_right .right_box1 p:last-child{
 	padding-left: 6px;
 	font-size: 12px;
 	line-height: 19px;
	color: #444;
 }
 .sale .sale_bd .sale_right .right_box1 p:last-child::after{
 	content: "";
 	position: absolute;
 	right: 0;
 	bottom: 0;
 	width: 53px;
 	height: 71px;
 	background: url(../images/qiandaizi.png) no-repeat;
 	background-size: 53px 71px;
 }
 .sale .sale_bd .sale_right .right_box2{
 	float: left;
 	width: 50%;
 	height: 116px;
 	border-right: 4px solid #fff;
 	box-sizing:border-box;
 	background: #f9f9f9;
 	position: relative;
 }
 .sale .sale_bd .sale_right .right_box2 p:first-child{
 	padding-top: 7px;
 	text-align: center;
 	font-size: 13px;
 	font-weight: bold;
 	color: #69aafe;
 	line-height: 20px;
 }
 .sale .sale_bd .sale_right .right_box2 p:last-child{
 	text-align: center;
 	font-size: 12px;
 	color: #454545;
 }
 .sale .sale_bd .sale_right .right_box2 p:last-child i{
 	color: #69aafe;
 	font-style: normal;
 }
 .sale .sale_bd .sale_right .right_box2 p:first-child::before{
 	position: absolute;
 	content: "";
 	bottom: 9px;
 	transform:translateX(0%);
 	width: 49.5px;
 	height: 35px;
 	background: url(../images/feiji.png) no-repeat;
 	background-size: 49.5px 35px;
 }
 .sale .sale_bd .sale_right .right_box3{
 	float: left;
 	width: 50%;
 	height: 116px;
 	box-sizing:border-box;
 	background: #f9f9f9;
 	position: relative;
 }
 .sale .sale_bd .sale_right .right_box3 p:first-child{
 	padding-top: 7px;
 	text-align: center;
 	font-size: 13px;
 	font-weight: bold;
 	color: #53cb74;
 	line-height: 20px;
 }
 .sale .sale_bd .sale_right .right_box3 p:last-child{
 	text-align: center;
 	font-size: 12px;
 	color: #444;
 }
 .sale .sale_bd .sale_right .right_box3 p:last-child i{
 	color: #53cb74;
 	font-style: normal;
 }
 .sale .sale_bd .sale_right .right_box3 p:first-child::before{
 	position: absolute;
 	content: "";
 	bottom: 9px;
 	transform:translateX(0%);
 	width: 48px;
 	height: 35px;
 	background: url(../images/pic-tmh-03.png) no-repeat;
 	background-size: 48px 35px;
 }
 /*热门活动部分*/
 .activity{
	width: 100%;
	height: 325px;
	margin: 8px auto;
	background-color: #fff;
	box-sizing:border-box;
}
.activity .topac{
	width: 100%;
	height: 44px;
	padding-top: 14px;
	position: relative;
	border-top: 1px solid #dbdbdb;
	border-bottom: 1px solid #dbdbdb;
	box-sizing:border-box;
}
.activity .topac h3{
	margin-left: 8px;
	width: 82px;
	height: 16px;
	text-indent: -888px;
	background: url(../images/un_home_text.png) no-repeat 0 -20px;
	background-size: 79px 57.5px;
	overflow: hidden;
}
.activity .topac span{
	position: absolute;
	margin-top: 15px;
	width: 90px;
	padding-left: 12px;
	height: 20px;
	line-height: 20px;
	font-size: 12px;
	background-image: -webkit-linear-gradient(left,#ff4e64,#ff6bc5);
	border-radius: 10px;
	color: #fff;
	right: 8px;
	top: -4px;
}
.activity .topac span::after{
	content: "";
	position: absolute;
	width: 7px;
	height: 7px;
	right: 8px;
	top: 6px;
	border-top: 2px solid #fff;
	border-right: 2px solid #fff;
	transform:rotate(45deg);
}
.activity .topac h3:after{
	content: "";
	position: absolute;
	left: 90px;
	top: 14px;
	width: 36px;
	height: 15px;
	background: url(../images/icon-gg@2x.png);
	background-size: 36px 15px;
}
.activity .contentac{
	width: 100%;
}
.activity .contentac ul{
	height: 280px;
	overflow: hidden;
}
.activity .contentac ul li{
	box-sizing:border-box;
}
.activity .contentac ul li:nth-child(1){
	float: left;
	width: 50%;
	height: 66.64%;
	border-right: 1px solid #dbdbdb;
	border-bottom: 1px solid #dbdbdb;
	box-sizing:border-box;
}
.activity .contentac ul li:nth-child(1) img{
	width: 100%;
	height: 100%;
}
.activity .contentac ul li:nth-child(2),
.activity .contentac ul li:nth-child(3){
	float: left;
	width: 50%;
	height: 33.33%;
	border-bottom: 1px solid #dbdbdb;
}
.activity .contentac ul li:nth-child(2) img,
.activity .contentac ul li:nth-child(3) img{
	width: 100%;
	height: 100%;
}
.activity .contentac ul li:nth-child(4){
	float: left;
	width: 50%;
	height: 33.33%;
	border-right: 1px solid #dbdbdb;
}
.activity .contentac ul li:nth-child(4) img{
	width: 100%;
	height: 100%;
}.activity .contentac ul li:nth-child(5){
	float: left;
	width: 50%;
	height: 33.33%;
}
.activity .contentac ul li:nth-child(5) img{
	width: 100%;
	height: 100%;
}
footer{
	width: 100%;
	background: #fff;
	margin-top: 8px;
	margin: 0 auto;
}
footer ul{
	width: 100%;
	height: 50px;
	border-top: 1px solid #dbdbdb;
	border-bottom: 1px solid #dbdbdb;
	overflow: hidden;
}
footer ul li{
	float: left;
	width: 33.33%;
	font-size: 14px;
	text-align: center;
	padding-top: 30px;
	position: relative;
}
footer ul li a{
	text-decoration: none;
	color: #323234;
}
footer ul li a::before{
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	left: 50%;
	margin-left: -9px;
	top: 7px;
	background: url(../images/icon.png) no-repeat -60px -153.5px;
	background-size: 104px 327.5px;
}
footer ul li:nth-child(2) a::before{
	background-position:  -60px -173.5px;
}
footer ul li:nth-child(3) a::before{
	background-position:  -60px -310px;
}
.footerbar{
	margin: 0 auto;
	width: 100%;
	height:61px;
	padding-top: 9px;
	padding-right: 25%;
	padding-bottom: 15px;
	padding-left: 25%;
}
.footerbar .bar{
	width: 50%;
	font-size: 11px;
	color: #666563;
}
.footerbar p a{
	text-decoration: none;
}
.footerbar .bar .map{
	width: 56px;
	height: 17px;
	padding-right: 4px;
	border-right: 1px solid #a5bde3;
}
.footerbar .bar .global{
	width: 108px;
	height: 17px;
	margin-left: 6px;
	padding-right: 6px;
	border-right:1px solid #a5bde3; 
	position: relative;
}
.footerbar .bar .global span{
	width: 11px;
	height: 11px;
	position: absolute;
	left: 0;
	bottom: 0;
	background: url();
}
.footerbar .bar .comp{
	width: 56px;
	height: 17px;
	padding-left: 4px;
}
.footerbar .copy{
	width: 50%;
	text-align: center;
}
.footerbar .copy a{
	color: #999997;
	font-size: 12px;
}





共有 人打赏支持
粉丝 0
博文 1
码字总数 2357
×
爱虎
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: