我有一个包含三个框的页面。我试图发生的事情是,当我点击第三个盒子时,盒子1被提示以一种速度消失,并在较慢的盒子中消失两个盒子。提示Webkit转换
<html>
<head>
<style>
div.box { /* this style applies only to the 'before' transition state */
opacity:1;}
div.fadeAway { /* give the transition rules to "after" state */
opacity:0;
-webkit-transition-property: opacity;
-webkit-transition-duration: 2s; }
div.fadeAway2 { /* give the transition rules to "after" state */
opacity:0;
-webkit-transition-property: opacity;
-webkit-transition-duration: 5s; }
</style>
</script>
</head>
<body>
<div class="box"
style="width:100px;
height:100px;
background-color:green;">
Tap to fade
</div>
<div class="box2"
style="width:100px;
height:100px;
background-color:red;">
Tap to fade
</div>
<div class="box3"
style="width:100px;
height:100px;
background-color:blue;"
this.onclick=".box2 .box3.className = 'fadeaway''fadeaway2'">
Tap to fade
</div>
</body>
</html>
在此先感谢您的帮助。
这里是我放在一起捣鼓它http://jsfiddle.net/mCjmt/ – loriensleafs 2012-03-05 20:10:15