Ich habe ein extrem einfaches Flexbox-basiertes Layout mit einem div und einer Fußzeile. Die Fußzeile enthält ein Eingabefeld. Immer wenn die Tastatur in der mobilen Safari oder im Chrom erscheint, wird eine kleine Lücke zwischen dem Körper und der Tastatur gezeigt. Kann jemand diese schreckliche Lücke entfernen?Flexbox mobile Fußzeile mit Eingabe verursacht virtuelle Tastaturlücke
Bitte beachten Sie die nachfolgende JS Bin auf Ihrem Gerät: http://jsbin.com/rujexadodu/edit?html,css,js,output
Voll Code
<html>
<head>
<title>Test</title>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, user-scalable=0"/>
<style type="text/css">
html {
margin: 0;
padding: 0;
}
body {
height: 100%;
margin: 0;
padding: 0;
border: 1px solid pink;
}
.container {
height: 100%;
display:flex;
flex-direction: column;
margin: 0;
padding: 0;
}
.footer {
height: 30px;
background-color: lightgray;
padding: 10px;
display: flex;
align-items: center;
}
.content {
flex: 1;
height: 100%;
width: 100%;
padding: 10px;
}
input {
width: 100%;
}
</style>
</head>
<body>
<div class="container">
<div class="content">
This is the body content.
</div>
<div class="footer">
<input type="text" />
</div>
</div>
</body>
</html>
Was sehen Sie, wenn Sie es inspizieren? –
Welche Version von iOS? Ich sehe das Problem nicht auf meinem iPad –