文档章节

携程网手机端网页样式

爱虎
 爱虎
发布于 2017/05/07 16:52
字数 2357
阅读 1
收藏 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="">&copy;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
作品 0
三星手机出现bug,自动给女友发送了照片

隐私越来越敏感了。 最近,有用户反映,vivo NEX手机上QQ浏览器打开携程、去哪儿等网页时,摄像头会自动升降,怀疑App偷拍自己。 从视频中可见,用QQ浏览器访问携程移动端后,NEX的前置镜头开...

又田
06/29
0
0
移动APP存重大安全隐患,用户数据未启用HTTPS加密

  刚刚过去的2015“双十一”,天猫最终以912.17亿元的交易额创下惊人纪录。值得注意的是,天猫移动端交易额为626亿元,占比达68.67%,远超PC端交易规模。这预示着电子商务的移动时代真正到...

凯文加内特
2016/04/08
37
0
去哪儿网任命陈刚为CEO 探索年轻化、创新化突破

  智察网讯 继携程曝出机票捆绑及虐待儿童致声誉受损后,携程正在尝试大力扶持并购的去哪儿网。12月6日,去哪儿网宣布,任命陈刚为公司CEO,原CEO谌振宇将升任去哪儿网董事长。   据介绍...

智察大数据
2017/12/07
0
0
webview 可能是ajax被阻止

先给网址,是携程的车票查询的。http://m.ctrip.com/html5/trains/ 问题是这样的。我在手机自带浏览器,UC,qq浏览器,查看这个网页都是可以的。 但自己写的webview一直会显示不完整,会是什...

唯丶
2015/11/17
1K
3
关于在移动端 body overflow:hidden 无效的问题

关于在移动端 body overflow:hidden 无效的问题 一、简述 这篇文章作为一道前菜哈。 很多同学在做移动端的时候都有遇到移动端各种坑,各种固定fiexd失效,input输入框错位,软键盘弹出错位等...

Cc卿
06/01
0
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

HTTPS is easy

HTTPS is easy https://www.troyhunt.com/https-is-easy/ HTTPS is easy! In fact, it's so easy I decided to create 4 short videos around 5 minutes each to show people how to enable ......

openthings
22分钟前
0
0
bugList 2

用户端: 1. 上传文件时,当选择:彩色-A3-双面时,第二个图片有bug 应改为 和第一个图片的类型相同 2. 确认打印时,三个下拉选目前有bug 应改为:根据后台配置的商家,group by计算出不同城...

勇恒
25分钟前
2
0
keras cnn 网咯 mnist 分类

搭建貌似比tf是简单很多。。。。。 from keras.datasets import mnistfrom keras.utils import np_utilsfrom keras.models import Sequentialfrom keras.layers import Dense, Activat......

阿豪boy
27分钟前
0
0
解决 /var/run/nginx.pid failed

nginx: [error] open() "/var/run/nginx.pid" failed (2: No such file or directory) sudo nginx -c /etc/nginx/nginx.conf nginx -s reload...

驛路梨花醉美
29分钟前
0
0
nginx负载均衡-ssl原理-生成ssl密钥对-nginx配置ssl

nginx负载均衡: 1.创建配置文件 vim /usr/local/nginx/conf/vhost/load.conf #添加以下内容: upstream qq_com #名字自定义,借助此模块定义多个IP,后面...

ZHENG-JY
29分钟前
0
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

返回顶部
顶部