时间:2021-07-01 10:21:17 帮助过:5人阅读
- <br><title></title> <br><style type="text/css"> <br>.imgclass{ width:300px; height:300px; border:solid 1px red;} <br></style> <br><script src="jquery-1.9.1.js" type="text/javascript"></script> <br><script type="text/javascript"> <br>$(function () { <br>$('#Button1').bind('click', function () { <br>$('img').fadeOut(2000, function () { <br>$('#Button1').val('哎,没了'); <br>}); <br>}) <br>$('#Button2').bind('click', function () { <br>$('img').fadeIn(2000, function () { <br>$('#Button2').val('有了'); <br>}); <br>}) <br>$('#Button3').bind('click', function () { <br>$('img').fadeTo(2000, 0.3, function () { <br>alert('动画执行完毕'); <br>}); <br>}) <br>}) <br></script> <br></head> <br><body> <br><div> <br><div> <br><input id="Button1" type="button" value="淡出" /><input id="Button2" type="button" value="淡入" /><input id="Button3" type="button" value="指定透明度" /></div> <br><div><img src="images/1.jpg" class="imgclass"/></div> <br></div> <br></body> <br>