OGeek|极客世界-中国程序员成长平台

标题: android - 为什么我的网站的导航和顶部在平板电脑上被推到右侧? [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 09:36
标题: android - 为什么我的网站的导航和顶部在平板电脑上被推到右侧?

enter image description here

enter image description here

如您所见,顶部的背景和导航在平板电脑上被推向左侧。可能是什么问题?

CSS:

#header {
  background: #FFF;
  height: 69px;
  overflow: visible;
  border-bottom: 1px solid #ccc;
  padding-top: 29px;
  -webkit-box-shadow: rgba(0,0,0,0.2) 0 0 8px;
  -moz-box-shadow: rgba(0,0,0,0.2) 0 0 8px;
  box-shadow: rgba(0,0,0,0.2) 0 0 8px;
  z-index: 9999;
}

.section-gray {
  background: #f7f7f7;
  padding: 20px 0;
  position: relative;
}

元:

<meta name="viewport" content="width=device-width">

直播网站:http://www.m2comm-semi.com/



Best Answer-推荐答案


这与您的断点有关。第一个设置为767px:

@media handheld, only screen and (max-width: 767px) {
  .container {
    width: 100%;
  }
  etc.
}

您需要添加更多断点以允许可能大于 767 像素的设备。

关于android - 为什么我的网站的导航和顶部在平板电脑上被推到右侧?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33428008/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4