安卓系统页面底部隐私旗帜在页面底部跳动

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

请问是什么问题,为什么我的div的bottom:0;在安卓设备上会跳到看起来像bottom:-5;。 请看下面的图片。

Banner问题。

enter image description here

.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;
}
android html css mobile banner
1个回答
1
投票

通过在视口中添加最小和最大比例来解决这个问题。

<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0">
© www.soinside.com 2019 - 2024. All rights reserved.