【问题标题】:let css ignore Safari让 CSS 忽略 Safari
【发布时间】:2013-10-11 21:24:26
【问题描述】:

我的 css 有一个奇怪的问题,我在网上找不到解决方案…… 我在这个网站上的导航栏的“子菜单”中有这个 css:http://ahornung.tk 当我在除 Safari 之外的每个浏览器中查看子菜单时,它需要一个 margin-top: -43px; 才能让它看起来不错,但在 Safari 中却没有…… 如果存在 Safari 规则,css 是否会检测 Web 浏览器并忽略 css?

.submenu {
    position: absolute;
    z-index: 1000;
    display: none;
    left: 100%;
    margin-top: -43px;
    border: 0.5px solid black;
}

更新: 在 Safari 中,margin-top: -43px;...

【问题讨论】:

  • 我们很想看看你的代码和 CSS,但你似乎禁用了右键单击。
  • 试试top:10px 而不是margin-top: -43px
  • @Paulie_D Ctrl+Alt+U.
  • @Paulie_D 我又启用了右键

标签: html css safari browser


【解决方案1】:

很难确切地知道发生了什么,而是使用 margin-top 尝试使用 top:0 并根据需要进行调整。

【讨论】:

  • 如果我使用 top:0; 那是主要问题该对象确实位于页面顶部...
猜你喜欢
  • 2020-03-09
  • 2010-11-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-12-23
  • 2011-10-28
  • 2016-06-13
相关资源
最近更新 更多