0

我正在尝试使用 HTML 5 和 CSS3 重新创建页面http://www.rexonmedia.com/test/sohalo/images/html5_simpletest.png但高度有问题。我用 50px 测量了页脚的高度。在普通浏览器上看起来不错,但在移动浏览器上看起来真的很小。我在这里想念什么。是否有标签或方程式可以在移动浏览器上正确显示?

HTML 测试

<link rel="stylesheet" type="text/css" href="style/reset.css" />
<link rel="stylesheet" type="text/css" href="style/styles.css" />

<meta name="description" content="The HTML5 Herald">
<meta name="author" content="SitePoint">
<!--[if lt IE 9]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->
</head>
<body>
<header> </header>
<div id="wrap">
<div id="main"> </div>
</div>
<footer> </footer>
</body>
</html>

CSS

@charset "UTF-8";
/* CSS Document */



header{
    width:100%;
    height:50px;
    background-color:#113b44;
}

#wrap {
    min-height: 100%;
}

#main {

}

footer {
    position:fixed;
    bottom:0px;
    width:100%;
    background-color:#231f20;
    height:50px;
}
4

1 回答 1

0

也许在 CSS 高度中尝试 pt 而不是 px ?这是 Web 开发中非常常见的问题。一种解决方案是检测用户的屏幕分辨率并包含“移动”样式表。

于 2012-07-17T00:50:03.287 回答