近来,本人做php的手机网站,用WAP2。0版面在手机看老变形
@charset "utf-8";
/* -------------------------------公共样式----------------------------------------------- */
body { text-align:left;font-family:"",arial;margin: 0;padding: 0;background: url(../images/background.jpg);font-size:12px; color:#666666;}
div,form,img,ul,ol,li,dl,dt,dd {margin:0;padding:0;border:0;}
li,dl{list-style-type:none;}
css样式表:
h1,h2,h3,h4,h5,h6 { margin:0;padding:0;font-size:12px;font-weight:normal;}
.left{float:left;}
.right{float:right;}
/*-----图片样式----*/
img{border:none;}
/*----字体样式-----*/
.fB {font-weight: bold;}
.f12px{ font-size:12px;}
.f14px{ font-size:14px;}
.f16px{ font-size:16px;}
.f18px{ font-size:18px;}
#background{width:240px;height:291px;background:url(../images/bg.gif) no-repeat;}
#logo{width:141px;height:59px;margin:22px 79px 6px 19px;}
#neirong{width:205px;height:166px;margin:12px 17px 0px 18px;}
#copyright{width:205px;height:16px;margin:13px 17px 8px 18px;}
.aboutk{width:80px;height:129px;float:left;margin:18px 6px 17px 8px;}
.newsk{width:106px;height:129px;float:right;margin:18px 4px 17px 0px;}
.about{width:52px;height:22px;background:url(../images/about.gif) no-repeat;padding-left:24px;padding-top:3px;margin-bottom:24px;}
.f{width:52px;height:22px;background:url(../images/feedback.gif) no-repeat;padding-left:24px;padding-top:3px;margin-bottom:27px;}
.z{width:52px;height:22px;background:url(../images/z.gif) no-repeat;padding-left:24px;padding-top:3px;}
.news{width:82px;height:21px;background:url(../images/news.gif) no-repeat;padding-left:24px;padding-top:3px;margin-bottom:27px;}
.o{width:82px;height:21px;background:url(../images/o.gif) no-repeat;padding-left:24px;padding-top:3px;margin-bottom:27px;}
.p{width:82px;height:21px;background:url(../images/p.gif) no-repeat;padding-left:24px;padding-top:3px;}
下面上页面:
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="css/index.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="background">
<div id="logo"><img src="images/logo.png" alt="" width="141" height="59" /></div>
<div id="neirong">
<div class="aboutk">
<div class="about">关于我们</div>
<div class="f">留言中心</div>
<div class="z">服务 支持</div>
</div>
<div class="newsk">
<div class="news">新闻快讯</div>
<div class="o">我们的客户</div>
<div class="p">产品 解决方案</div>
</div>
</div>
<div id="copyright">版权所有:佛山市网盛科技有限公司</div>
</div>
</body>
</html>