http://javascript.html.it/script/ved...rima-immagine/
qui c'è uno script per vedere immagine passando sopra ad una scritta
come si fa a spostare in alto questa scritta? e non sotto la scritta?
il codice è il seguente
<script src="jquery.min.js" type="text/javascript"></script>
<script src="imgpreview.full.jquery.js" type="text/javascript"></script>
<style type="text/css">
#imgPreviewWithStyles,
#imgPreviewWithStyles2,
#imgPreviewWithStyles3 {
background: #222 url(images/loading.gif) no-repeat center;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
padding: 15px;
z-index: 999;
border: none;
}
#imgPreviewWithStyles span,
#imgPreviewWithStyles2 span,
#imgPreviewWithStyles3 span {
color: white;
font-size: 1em;
text-align: center;
display: block;
padding: 50px 50px 3px 60px;
}
.loading {
height: 32px;
width: 32px;
}
</style>
</head>
<body>
<div id="third">
Immagine del sole
</div>
<script type="text/javascript">
//<![CDATA[
jQuery.noConflict();
(function($){
$('div#third a').imgPreview({
containerID: 'imgPreviewWithStyles',
imgCSS: {
// Limit preview size:
height: 200
},
// When container is shown:
onShow: function(link){
// Animate link:
$(link).stop().animate({opacity:0.4});
// Reset image:
$('img', this).css({opacity:0});
},
// When image has loaded:
onLoad: function(){
// Animate image
$(this).animate({opacity:1}, -50);
},
// When container hides:
onHide: function(link){
// Animate link:
$(link).stop().animate({opacity:1});
}
});
})(jQuery);
//]]>
</script>