The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS onHover change image when using image map

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #247628

    Hi there,

    I would like to change image onHover when using imagemap(<area>,<map>,…)

    Here are my HTML and related CSS:

    img src=”images/circle/a.png” /
    <map name=”123″ id=”123″>
    <area class=”onetest” href=”#” shape=”polygon”coords=”286,89,504,31,504,134,338,180″ />

    .onetest {
    width: 100px;
    height: 100px;
    background: url(‘../images/circle/a.png’);

    .onetest:hover {
    z-index: 50;
    background: url(‘../images/circle/b.png’);

    What I want to do is that when I hover a specific area on the image, the image would change to another.


    You can’t style area tags as they aren’t in the DOM. They are just a set of coordinates.

    You might want to try SVG instead.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.