webapp设置适应pc和手机的页面宽高以及布局层叠图片文字

<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<title>我趣旅行网-美剧迷</title>
		<meta charset="utf-8">
		<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<meta name="format-detection" content="telephone=no">
		<link rel="stylesheet" type="text/css" href="test.css">
	</head>
	<body>
		<div class="wrapper">
			<img class="bg" src="img/background.png"/>
			<img class="logo" src="img/pisode_logo.png">
			<p class="pisode">Pisode</p>
		</div>
	</body>	
</html>	

css:

html,body{
	height:100%;
	margin:0;
	padding:0;
}
.wrapper{
	position:relative;
	margin: 0 auto;
	max-width: 500px;
	min-height: 100%;
	text-align: center;
	width: 100%;
}
.bg{
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	z-index: -1;
	height: 100%;
}
.logo{
	width:100%;
}
.pisode{
	font-size:14px;
}

效果图:

webapp设置适应pc和手机的页面宽高以及布局层叠图片文字


訪问链接:http://2.chuang8.sinaapp.com


上一篇:This application failed to start because it could not find or load the Qt platform plugin "windows". Available platform plugins are: minimal, offscreen, windows.....解决方法


下一篇:苹果开发者账号类型