Tip: you can modify some code before running
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Progress bar animation effect</title><meta http-equiv="content-type" content="text/html;charset=gb2312"><!--把下面代码加到<head>与</head>之间--><style type="text/css">Body {margin: 0px; padding: 0px;} # ibox {line-height: 20px; width: 300px; height: 20px; background: # ccc; text-align: left; margin: 100px auto 0 auto ;}# iLoading {color: # fff; font-size: 12px; line-height: 20px; width: 0px; height: 20px; background: red; text-align: center; position: absolute ;}</style><script type="text/javascript">Window. onload = function () {var idiv = document. getElementById ('uploading'); var ibox = document. getElementById ('ibox'); var timer = null; timer = setInterval (function () {var iWidth = idiv. offsetWidth/ibox. offsetWidth * 100; idiv. style. width = idiv. offsetWidth + 1 + 'px '; idiv. innerHTML = Math. round (iWidth) + "%"; if (iWidth = 100) {clearInterval (timer) ;}, 1 );}</script></head><body><!--把下面代码加到<body>与</body>之间--><div id="ibox"> <div id="iLoading"></div></div></body></html></td> </tr></table>
Tip: you can modify some code before running