1
A
回答
6
没错肯定的是,只用一个相对定位的div内的绝对定位的链接(与背景图像)。
样本HTML
<div class="hotspot-container">
<a href="some-href-for-the-hot-spot" class="hotspot"> </a>
</div>
CSS
.hotspot-container {
width: 200px; height: 200px;
position: relative;
background: url(some-background-image) no-repeat;
}
.hotspot-container .hotspot {
width: 10px; height: 10px;
position: absolute;
top: 20px; /* Top coord of hotspot (relative to parent, bottom: 20px is also valid) */
left: 20px; /* Left coord of hotspot (right: 20px is also valid); */
}
相关问题
- 1. 如何添加背景图像到div?
- 2. 带背景图像的DIV
- 3. 将图像带到背景
- 4. 将背景添加到透明图像
- 5. 将背景图像添加到Shiny NavBarPage
- 6. 将背景图像添加到FlowCover
- 7. 将图像添加到JPanel背景
- 8. 将背景图像添加到UILabel
- 9. 通过单击事件将背景图像添加到div。
- 10. 通过javascript将背景图像添加到div
- 11. 将背景图像和背景颜色对添加到元素
- 12. 是否可以将图像添加到标题背景图像下的背景?
- 13. 带有背景图像的Div图像集
- 14. 将img添加到div作为背景
- 15. 带有圆角的背景图像的div中的透明div
- 16. 如何将边缘添加到带有CSS背景图像的按钮?
- 17. 如何将类添加到div如果背景图像等于特定图像
- 18. 如何在循环中添加带有背景图像的JLabel
- 19. Div背景图像
- 20. 添加背景图像到IKImageBrowserView
- 21. 添加背景图像到UIScrollView
- 22. 从div中提取图像并添加为背景图像
- 23. 与背景图像的DIV?
- 24. div的背景图像
- 25. 如何将背景图像添加到自动展开高度的div底部
- 26. 带有FOP背景图像的文本
- 27. 带有透明背景的图像Launchscreen.storyboard
- 28. 无法将背景图片添加到div元素,角度2
- 29. 带有两个背景图像的CSS变换Div
- 30. 当div溢出时滚动带有内容的背景图像
非常感谢!完美的作品。 – Erik 2010-08-17 23:49:23
没有probs,您可以根据需要添加尽可能多的热点,并且可以使用z-index属性(即z-index:100)控制重叠。最高的Z指数将位于顶部。玩的开心! – Marko 2010-08-17 23:54:28
这似乎不适用于IE7。它不认识热点。 – Marsman 2013-02-06 17:29:20