【发布时间】:2010-09-08 16:54:24
【问题描述】:
我的问题是我有一个 z-index 为 100 的菜单栏,以及该栏的两个 z-index 为 1000 的元素(抱歉,在代码中,z-indexes 实际上是更高的数字,但相差一个因子10 ...我意识到这是不好的做法,但我还没有改变它,因为有几部分连接)。在 Firefox 中,tweet 按钮和 facebook 按钮总是出现在菜单栏下方。它在所有其他浏览器中都能完美运行。现场示例在我的Los Angeles Food Truck Map。以下是一些相关代码:
#tweet_button{
position:relative;
left:6px;
bottom:10px;
z-index:100000000;
}
...
<div id="smoothmenu1">
<b id="tweet_button"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none" data-via="truxmap">Tweet </a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></b>
<span id="facebook_buton" style="color:white;"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fla.truxmap.com&layout=button_count&show_faces=false&width=80&action=like&colorscheme=light&height=21" scrolling="no" frameborder="0" style="position:relative; left:10px;top:4px;border:none; overflow:hidden; height:35px; color:white;width:90px;overflow:hidden;z-index:100000000;" allowTransparency="true"></iframe></span>
</div>
请注意,我使用的是 GWT。我注意到有时,推特按钮的框架上叠加了一个谷歌广告感知广告......我不太确定为什么会发生这种情况,但我认为它可能与解决方案有关。
非常感谢!!
【问题讨论】:
标签: html css firefox cross-browser