请问是什么问题,为什么我的div的bottom:0;在安卓设备上会跳到看起来像bottom:-5;。 请看下面的图片。
Banner问题。
.alert {
padding: 20px;
background-color:#0c4105;
color: white;
position: fixed;
bottom: 0;
left: 0;
width:100%;
}
@media only screen and (max-width: 800px) {
.alert {
width:100%;
bottom: 0.11111px;
}
}
.conbtn {
margin-left: 15px;
color: white;
font-weight: bold;
float: right;
font-size: 22px;
line-height: 20px;
cursor: pointer;
transition: 0.3s;
}
.conbtn:hover {
color: black;
}
通过在视口中添加最小和最大比例来解决这个问题。
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0">