<h3>使用fadeTo()方法设置淡入淡出效果的不透明度</h3>
<span class="red"></span><span class="orange"></span><span class="blue"></span>
<script type="text/javascript">
$(function () {
$("span").each(function (index) {
switch (index) {
case 0:
$(".red").fadeTo(2000,0.4);
break;
case 1:
$(".orange").fadeTo(2000,0.6);
break;
case 2:
$(".blue").fadeTo(2000,0.8);
break;
}
});
});
</script>