开发者

Styling area tags [duplicate]

开发者 https://www.devze.com 2023-03-13 22:39 出处:网络
This question already has answers here: Visible Area tag? (5 answers) Closed 5 years ago. I have a pair of image-maps on which I want their areas to high-light when the mouse hovers over th
This question already has answers here: Visible Area tag? (5 answers) Closed 5 years ago.

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 HTM开发者_运维技巧L tag. Can anyone suggest how I could get this to work?

Thanks


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消