Chrome / Safari中绝对定位的图像 [英] Absolutely positioned images in Chrome/Safari

查看:145
本文介绍了Chrome / Safari中绝对定位的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我客户的websit有一个宽幅图片横幅形式的导航栏。每当用户将鼠标悬停在横幅的某些区域上时,我正在使用HTML < area> 标记和JavaScript来覆盖导航按钮(它们本身就是图片)。这些按钮绝对位于各自的<区域> 的位置,并根据鼠标位置隐藏/显示。



虽然我在Chrome上使用它,但我注意到按钮出现在Safari上的错误位置。我一直在努力弄清楚问题所在,但迄今为止尚未取得成功。有没有人遇到过这样的问题?



以下是该网站草稿的链接: http://bit.ly/dLIh4k 。感谢!

解决方案

不知道这是否适用于您,但如果父级使用相对定位,则存在绝对定位的已知问题。 / p>

My client's websit has a navigation bar in the form of a wide image banner. I'm using the HTML <area> tag and JavaScript to overlay navigation buttons (which are themselves images) whenever the user mouses over certain regions of the banner. The buttons are absolutely positioned over their respective <area>'s, and are hidden/shown based on the mouse position.

While I have it working on Chrome, I've noticed that the buttons are appearing in the wrong place on Safari. I've struggled to figure out what the issue is, but haven't been successful so far. Has anyone encountered a problem like this before?

Here's a link to the draft of the site: http://bit.ly/dLIh4k. Thanks!

解决方案

not sure if this applies to you but there are known issues with absolute positioning if the parent uses relative positioning.

这篇关于Chrome / Safari中绝对定位的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆