如何在此拇指预览中添加淡入/淡出
问题描述:
如何在悬停拇指时添加一些淡入?如何在此拇指预览中添加淡入/淡出
神奇的JS这就需要褪色:
function showT(image){document.getElementById('ima').setAttribute('src',image)}
一些:
<img id="ima" src="http://www.google.com/images/srpr/logo3w.png" height="75" width="75"/>
<a href="#" onmouseover="showT('http://www.google.com/logos/2012/cossington_smith-12-hp.jpg')">pic 1</a>
<a href="#" onmouseover="showT('http://www.google.com/logos/2012/earthday12-hp.jpg')">pic 2</a>
<a href="#" onmouseover="showT('http://www.google.com/logos/2012/Friedrich_Frobel-2012-hp.jpg')">pic 3</a>
答
的jQuery:
$("#thumbnail-1").hover(function() {$(this).fadeIn(fast);},function() {$(this).fadeOut(fast);});
CSS3:
a {
opacity:0.3;
transition:opacity 1s;
-webkit-transition:opacity 1s; /* Safari */
}
a:hover {
opacity:1;
}
+0
宁可在非css3太m8工作。我加了一个小提琴! – fourroses 2013-05-13 22:52:58
THANX,我喜欢这个最好的:) – fourroses 2013-05-13 22:59:16
@fourroses很高兴帮助:) – JAM 2013-05-13 22:59:43
第二看:有没有什么办法让它走得更快? 或只是淡入? – fourroses 2013-05-13 23:01:56