понеделник, 26 декември 2011 г.

Добавяне на описание към снимки tooltip



<div class="photos">
<a href="photo1.html"><img src="photo1.jpg" alt="Photo1" /><span class="caption">Description of photo1</span></a>
<a href="photo2.html"><img src="photo2.jpg" alt="Photo2" /><span class="caption">Description of photo2</span></a>
</div>

.photos a { display: block; position: relative; float: left; margin:0.5em; }
.photos a span { display: none; color: white; }
.photos a:hover { background: ; text-decoration: none; }
.photos a:hover span { display: block; position: absolute; top: 200px; left: 0; width: 150px; } 

Няма коментари: