Forums

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
    Posts
  • #247628
    k134563
    Participant

    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″ />
    </map>

    .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.

    #247630
    Paulie_D
    Member

    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.

    http://stackoverflow.com/questions/5026421/apply-css-to-area-map

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