简体   繁体   中英

Hover over a point of an image and text appears on the side

I have an image and on the image is a timeline with 4 numbers. I want text to appear next to the image when I hover over one of the numbers. How do I do this?

Much appreciated.

there you go: http://jsfiddle.net/zcps7xef/

html

<div id="contain">
<a>text</a>
    <div class="text">other text</div>
</div>

css

#contain{
    clear: both;
}

a{
    float: left;
    margin-right: 14px;
}

#contain:hover div.text{
    display: block;
}

.text{
    float: left; 
    display: none;    
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM