【发布时间】:2016-02-05 08:10:28
【问题描述】:
网站是http://www.oahu-hawaii-luau.com/ 我的标题不会出现在小型移动屏幕上,但是当我缩小桌面窗口时我可以看到它。 所以看来问题只出在 Mobile 和 Safari 上。该问题出现在小于 984 像素的屏幕上。
我的标志头代码是:
.logo-logobg {
position: absolute;
min-width: 300px;
min-height: 1260px;
width: 100%;
z-index: 1000;
background: url(images/logo-logobg.png) left top no-repeat;
}
我将问题缩小到移动导航。错误在此代码中,但仍然无法弄清楚到底是什么:
.nav-mobile {
display:block;
}
.nav {
width:100%;
padding:0px 0 0 0;
position:absolute;
z-index:999999;
top:53px;
}
.nav-list {
display:none;
}
.nav-item {
width:100%;
float:none;
background-image:none;
padding-bottom:0px;
}
.nav-item:hover {
background-image:none;
padding-bottom:0px;
}
.nav-item > a {
display:block;
color:#ffffff;
padding:8px 16px;
text-decoration:none;
font-size:14px;
border-bottom:1px solid #276815;
margin:0px;
height:auto;
line-height:normal;
border-radius:0px;
}
【问题讨论】:
-
可以附上截图吗?在我的 chrome 模拟器上看起来不错
-
在 Chrome 上可以,但在 Safari 上不行
-
@Parlanchina 这个网站有很多问题。看起来您正在使用 ASP Web 表单,将页面包装在表单标签中是残酷的。您还会在页面中间而不是在标题中注入一堆 CSS。还有使用像
<div align="center">这样的折旧或过时标记的问题。在 DIV 上使用align现在已过时。浏览器供应商很慷慨,并继续允许这样的标记工作,但没有义务这样做。如果这是一个新网站,我强烈建议您使用 HTML5 并复习有效的标记和实践。
标签: css