样式区域标签
我有一对图像映射,当鼠标悬停在它们上方时,我希望它们的区域突出显示。
我正在使用 jquery 来检测鼠标悬停并分配一个 css 类。作业成功了,我可以确认新的班级名称。但是,该区域并不高亮。
我最好的猜测是,area 可能不是一个可识别的 HTML 标签。谁能建议我如何让它发挥作用?
谢谢
I have a pair of image-maps on which I want their areas to high-light when the mouse hovers over them.
I am using jquery to detect the mouseover and assigning a css class. The assignment works and I can confirm the new class name. But, the area does not high-light.
My best guess is perhaps area is not a recognised HTML tag. Can anyone suggest how I could get this to work?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
html 区域标签似乎不是可以设置样式的视觉元素。但是,另一个问题: Visible Area tag? 指向一个非常有用的 jQuery 插件,您可以使用:< a href="http://davidlynch.org/js/maphilight/docs/" rel="nofollow noreferrer">http://davidlynch.org/js/maphilight/docs/
It seems like the html area tag is not a visual element that you can style. But, this other question: Visible Area tag? points to a very useful jQuery plugin you could use: http://davidlynch.org/js/maphilight/docs/
最好制作您想要叠加的图像并使用宽度和高度百分比放置它。使其也具有响应能力。
It might be better to make an image of what you want to overlay and place it using width and height percentages. Makes it responsive as well.