Question:

Image on mouseover ON TEXT hyperlink?

by  |  earlier

0 LIKES UnLike

Hey I am trying to get this code which would do image on mouseover on text.

meaning THIS IS LINK AND IF I MOVE MY MOUSEOVER TO LINK IT WILL SHOW IMAGE/PHOTO/PICTURE when i move my mouse over to it.

please please help thank you

 Tags:

   Report

1 ANSWERS


  1. Use CSS to declare that the ":hover" attribute for the link should include a background image.  Here's a simple first pass.  Put it in a .html file, and include a "foo.gif" image in the same directory.

    When you move the mouse over the first link, the image will appear.  It will not appear when moving over the second link.  (This is done by declaring a new tag -- imglink -- and only putting the background image on "imglink:hover".)

    ==========

    <html>

    <head><title>My test</title></head>

    <body>

    <style type="text/css">

    imglink:hover { background-image: url('foo.gif') }

    </style>

    This is a <a href=""><imglink>test</imglink></a>.

    <p>

    This is another <a href="">another one</a>.

    </body>

    </html>

    ==========

    - kb -

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.