How to achieve the progressive expansion of table row clicking! I once saw this effect on a flash RIA site, and the visual effect was really good. Flash developers also probably use this to demonstrate that the dynamic effect of flash applications is better than that of js (personal opinion ). Later, when I was doing bmail, I used GIF animation as the background and basically implemented this function, but I always felt that it was not perfect. In this case, the filter is used, which is visually smooth and saves the trouble of downloading images.
<Style> # tbList th {text-align: left; padding-left: 20; border: 1px solid white; border-right: 1px solid # 7994BF; border-bottom: 1px solid # 7994BF} # tbList td {padding-left: 6; border-top: 1px solid white; border-bottom: 1px solid # CDD0E1 }</style> <body style = font-size: 12> <table id = tbList cellpadding = 0 cellspacing = 0 width = 100% style = cursor: default; font-size: 12> <tr height = 25 bgcolor = # C1D1EA> <th width = 160> sender </t H> <th> topic </th> <th width = 90> date </th> <th width = 90> size </th> </tr> <tr height = 25> <td> Guan Yu </td> <td> Wong Jing Zhou </td> <td> February August 7 </td> <td> 4 k </td> </tr> <tr height = 25> <td> Zhang Fei </td> <td> changbanpo Yihe, scare 100,000 troops </td> <td> March 24 </td> <td> 5 k </td> </tr> <tr height = 25> <td> Zhao Yun </ td> <td> Zhao Zilong, the most handsome Mo Guo </td> <td> March 24 </td> <td> 3 k </td> </tr> </table>> click the table above, you can see the effect of line expansion </body> script document. getElementById ("tbList "). onmousedown = function (e ){ Var tb = this, tr, ee = e = null? Event. srcElement: e.tar get if (ee. tagName! = "TD") return tr = ee. parentNode if (tb. selRow! = Null) setTrReveal (tb. selRow, "background: white", 1) setTrReveal (tr, "background: # EAEAEA") tb. selRow = tr} function setTrReveal (tr, css, noDelay) {var I if (! Document. all) return tr.style.css Text + = ";" + css for (I = 0; I <tr. cells. length; I ++) {if (noDelay) {tr.cells? I =.style.css Text + = ";" + css continue} tr. cells [I]. style. filter = "progid: DXImageTransform. microsoft. revealTrans (duration= 0.5, transition = 16) "tr. cells [I]. filters [0]. apply () tr.cellspolici2.16.style.css Text + = ";" + css tr. cells [I]. filters [0]. play ()} script
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]