底部页脚不会在横向模式下停留在iOS 7中

问题描述 投票:0回答:1

我的网站已经差不多用完了,但是有一个小问题。

我的网站上具有固定的页眉和页脚,并具有快速响应的布局。

除了我将手机“倾斜”到“横向”模式外,所有的工作都与我想要的一样。 然后,站点在底部创建一个“填充/边距”,页脚被“强制”起来,内容在底部创建一个灰色边框。 页脚跟随内容。

但是,这就是事情。 它在其他具有更多内容(用于滚动)的其他页面上运行良好,但在仅包含一些联系信息的索引页面上却无法正常工作。

当我向索引页面添加更多文本时,它变得很正常。

有人知道我在做什么错吗,可以提供帮助吗?

我认为对此有一个简单的解决方法,但似乎找不到。

<title>Name</title>
<meta charset="utf-8">
<link rel="shortcut icon" href="images/icons/favicon.ico">
<link rel="stylesheet" href="style/structure.css">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0, minimal-ui" />

<?php include("style/header.php"); ?>

<div class="container">

        <div class="content">

        <h1>
            Name
            <br>
            Tlf: Tlf
            <br>
            E-post: <a href="#">mail</a>
        </h1>               

        </div>  <!-- END CONTENT -->

</div> <!-- END CONTAINER -->

<?php include("style/footer.php"); ?>

* {
margin: 0px;
padding: 0px;
}

body {
margin: 0 auto;
width: 90%;
clear: both;
background-color: #FFFFFF;
color: #444444;
font-size: 87.5%; /* 14px */
font-family: times, 'timesnewroman', 'times new roman', 'bakersville', serif;
line-height: 1.5;
-webkit-font-smoothing: 'antialiased';
position: relative;
display: block;
}

header {
height: 40px;
width: 90%;
position: fixed;
z-index: 1;
border-bottom: 1px solid rgba(136, 136, 136, 0.4);
background-color: #FFFFFF;
top: 0;
display: block;
}

footer {
width: 90%;
height: 35px;
float: left;
border-top: 1px solid rgba(136, 136, 136, 0.4);
text-align: center;
position: fixed;
bottom: 0;
background-color: #FFFFFF;
padding-top: 5px;
display: block;
}

.container {
max-width: auto;
min-height: auto;
float: none;
display: block;
text-align: center;
}

.content {
background-color: #ffffff;
color: #999999;
margin: 0 auto;
display: block;
padding-top: 40px;
padding-bottom: 40px;
}

.content h1 {
color: #000000;
float: left;
font-size: 13px;
line-height: 1.3;
font-weight: normal;
font-family: helvetica;
text-align: left;
}
css safari footer viewport landscape
1个回答
1
投票

如果您在野生动物园(iOS7)上的网站上出现灰色区域,则可能只是您的视口。 添加到viewport meta: (height="device-height")可能会解决您的问题。

© www.soinside.com 2019 - 2024. All rights reserved.