CSS 在 firefox、chrome 和 ie 中的运行方式不同

标签 css internet-explorer google-chrome firefox cross-browser

这与我网站上的 Logo 有关。我希望 Logo 中的怪物看起来就像坐在二级菜单上一样,因此我添加了以下代码。

#logo {position:absolute; z-index:20; margin-top:-5px !important;}
#top-menu {margin-left:300px;}

这是我想要的效果:http://i.imgur.com/5BMUMSF.png

不过,虽然这在 chrome 中运行良好。它在 Firefox 和 IE 中效果不佳。谁能帮忙?我尝试在两个浏览器上干预 css,但在一个浏览器中有效的功能不会转移到另一个浏览器。

您可以浏览我的网站 http://nomnom.sg

最佳答案

img#logo {
    float: left;
    margin: 0px 23px 0px 0px;
    display: block;
    position: relative;
    top: 13px;
    z-index: 11111;
}

ul#top-menu {
    float: left;
    padding: 25px 0px 0px;
    font-family: Arial, Verdana, sans-serif;
    position: relative;
    top: 20px;
}

关于CSS 在 firefox、chrome 和 ie 中的运行方式不同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21071565/

相关文章:

javascript - 在 IE 上存储 cookie (11)

internet-explorer - 如何在 Linux 上一次重新加载所有浏览器?

javascript - 从网站中删除除 X 之外的所有元素

css - 在 Chrome 中清除焦点上的 HTML5 占位符属性文本

html - 当输入文本太长时,工具提示框看起来很奇怪

javascript - 电子邮件类型输入 : dynamically change color/text of the button if the email is wrong or correct

javascript - 单击按钮时不显示隐藏表单

css - Sass 文件不能在 IE 上运行

javascript - Chrome OSX (Mac) 上 keyUp 事件中的 cmd+c

html - IE 9 中无法加载字体