当虚拟键盘在手机上弹出时,Div会跳起来

时间:2015-04-24 08:03:11

标签: html css mobile

我的div之一出了点问题。我试图让我的设计尽可能响应,导致一些错误。当我想在手机上输入新地址时,白色wrapperdiv会跳起来。

我正在处理的网站是here

HTML

<div class="row">
<div class="logo"></div> 
<div class="times"></div>
</div>

CSS:

html, body {
background: url(img/background.jpg);
height:100%;
background:cover;
}
* {
padding: 0;
margin: 0;
}
.row {
display:block;
background-color:rgba(255,255,255,0.5);
width: 80%;
position:fixed;
left:10%;
top:10%;
height: 80%;
}

.columns {
display: inline-block;
position: relative;
position: fixed;
height: 80%;
width:inherit;
left:0;
top: 10%;
padding-bottom:0;
.align-right {
text-align: center;
}
@media screen and (max-width: 680px) {
.columns {
width: 100%; 
}
}
}
@media only screen and (max-width: 2000px){
.logo {
margin-left:auto;
margin-right:auto;
width:400px;
height:208px;
background-image: url(img/logo1.png);
background-repeat: no-repeat;
text-align:center;
}
}

@media only screen and (max-width: 768px){
.logo {
margin-left:auto;
margin-right:auto;
width:200px;
height:108px;
background-image: url(img/logo.png);
background-repeat: no-repeat;
text-align:center;
}   
}
@media only screen and (max-width: 2000px){
.times {
margin-left:auto;
margin-right:auto;
width:350px;
height:100%;
background-image: url(img/times1.png);
background-repeat: no-repeat;
text-align:center;
margin-top:3%;
}
}
@media only screen and (max-width: 768px){
.times {
margin-left:auto;
margin-right:auto;
width:200px;
height:100%;
background-image: url(img/times.png);
background-repeat: no-repeat;
text-align:center;
margin-top:3%;
}   
}

我非常清楚这可能是一个非传统的网站。

0 个答案:

没有答案