我的影片格式为菜单表,并在窗口(使用媒体查询)变得太小,应该使自己适应。而不是在一条线上,菜单项应该将自己定位对方的下面,所以这样的:Safari浏览器(移动和桌面)表浮动错误
它在Chrome桌面工作正常,但是当我尝试在Safari中出现这种情况:
这真的很奇怪。我清除了缓存,所以这不是问题。移动Safari和移动Chrome浏览器也会出现同样的问题。我在这里真的很沮丧,我希望有人知道一个解决方案。 这里有一个展示的jsfiddle菜单:https://jsfiddle.net/0wwnqkd9/ 编辑:想补充,它的工作中的jsfiddle,在Safari。
您还可以访问this website用于演示
而(隔离)代码:
HTML
<div id="MENU_WR">
<table id="MENU">
<td><a href="#ABOUT">about</a></td>
<td><a href="#products">products</a></td>
<td><a href="#portfolio">portfolio</a></td>
<td><a href="#portfolio">portfolio</a><
</table>
</div>
CSS
body {
background-color: #171319;
}
#MENU_WR {
position: absolute;
top: 100px;
bottom: 0;
left: 0;
right: 0;
max-width: 600px;
width: 60%;
height: 55px;
border: 2px solid rgba(128, 176, 105, 0.3);
border-radius: 10px;
animation: menuDown 1.5s ease-in;
}
#MENU {
font-family: Comfortaa, Arial;
border-collapse: collapse;
font-weight: normal;
width: 100%;
height: 100%;
font-size: 20px;
color: #7fb069;
text-align: center;
}
#MENU td {
width: 25%;
height: 100%;
}
#MENU td>a {
padding-top: 15px;
display: block;
text-decoration: none;
color: inherit;
width: 100%;
height: 100%;
}
#MENU td:hover {
background: rgba(128, 176, 105, 0.3);
}
#MENU td:first-child {
border-bottom-left-radius: 8px;
border-top-left-radius: 8px;
}
#MENU td:last-child {
border-bottom-right-radius: 8px;
border-top-right-radius: 8px;
}
@media screen and (max-width: 980px) {
#MENU_WR {
display: inline-block;
width: 100%;
max-width: none;
border: none;
height: 220px;
border-radius: 0;
}
#MENU td {
display: inline-block;
width: 100%;
height: 25%;
float: left;
border-radius: 0;
}
#MENU {
float: left;
}
#MENU td:first-child {
border-bottom-left-radius: 0px;
border-top-left-radius: 0px;
}
#MENU td:last-child {
border-bottom-right-radius: 0px;
border-top-right-radius: 0px;
}
}
不知道你注意到没有,但问题并不在Safari中,你所提供的的jsfiddle发生。不过,我可以在您的网站上复制它。检查出来... –
@JonUleis是的,想补充一点。它在JSFiddle IN Safari中工作。我完全不知道这里发生了什么。 – YSbakker