Home > Web Front-end > JS Tutorial > How to achieve the gradual expansion effect when clicking on a row in the table! _javascript skills

How to achieve the gradual expansion effect when clicking on a row in the table! _javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 19:21:59
Original
1138 people have browsed it

I once saw this effect on a flash RIA site. The visual effect is really good. Flash developers probably use this to show that applications made with flash are better than js in terms of dynamic effects (personal opinion). Later, when I was working on bmail, I used gif animation as the background and basically realized this function, but I always felt it was not perfect. This time, I used filters, which are visually smoother and save the trouble of downloading images.


[Ctrl A select all Note: If you need to introduce external Js, you need to refresh to execute
]<script> document.getElementById("tbList").onmousedown=function(e){ var tb=this,tr,ee ee=e==null?event.srcElement:e.target 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.cssText+=";"+css for(i=0;i< tr.cells.length;i++){ if(noDelay){ tr.cells[i].style.cssText+=";"+css continue } tr.cells[i].style.filter="progid:DXImageTransform.Microsoft.RevealTrans(duration=0.5,transition=16)" tr.cells[i].filters[0].apply() tr.cells[i].style.cssText+=";"+css tr.cells[i].filters[0].play() } } </script>
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template