资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
[分享]一个非常漂亮的进度滚动条
<table border="0" cellpadding="0" cellspacing="0"> <tr> <td width="1" rowspan="2"></td> <td width="1" height="1"></td> <td height="1" bgcolor="#cccccc"></td> <td width="1"></td> <td width="1" rowspan="2"></td> </tr> <tr> <td width="1" height="1" bgcolor="#cccccc"></td> <td height="1"></td> <td width="1" bgcolor="#cccccc"></td> </tr> <tr> <td width="1" bgcolor="#cccccc"></td> <td width="1" height="1"></td> <td width="120" height="0"><marquee direction="right" scrollamount="10"><table id="marq" style="font-size:1px;width:50px;height:10px;"><tr><td></td><td ></td><td></td><td ></td><td></td></tr></table></marquee></td> <td width="1" height="1"></td> <td width="1" bgcolor="#cccccc"></td> </tr> <tr> <td rowspan="2"></td> <td height="1" bgcolor="#cccccc"></td> <td height="1"></td> <td bgcolor="#cccccc"></td> <td rowspan="2"></td> </tr> <tr> <td height="1"></td> <td height="1" bgcolor="#cccccc"></td> <td></td> </tr> </table> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%20languge%3D%22JavaScript%22%3E%20%20%0D%0Avar%20lightRGB%20%3D%20new%20Array(255%2C255%2C255)%3B%20%20%0D%0AinitColor(%22%230000FF%22)%3B%20%20%0D%0Afunction%20initColor(Color)%7B%20%20%0D%0Avar%20opArray%3Dnew%20Array(.10%2C.25%2C.50%2C.75%2C1.0)%3B%20%20%0D%0Avar%20baseColor%20%3D%20longHexToDec(Color.substring(1%2C7))%3B%20%20%0D%0Avar%20nColor%2CnHex%3B%20%20%0D%0Afor(var%20i%3D0%3Bi%3C5%3Bi%2B%2B)%20%7B%20%20%0D%0AnColor%3DsetColorHue(baseColor%2CopArray%5Bi%5D%2ClightRGB)%3B%20%20%0D%0AnHex%20%3D%20toHex(nColor%5B0%5D)%2BtoHex(nColor%5B1%5D)%2BtoHex(nColor%5B2%5D)%3B%20%20%0D%0Adocument.all.item(%22marq%22).firstChild.firstChild.children(i).bgColor%3D%22%23%22%2BnHex%3B%20%20%0D%0A%7D%20%20%0D%0A%7D%20%20%0D%0Afunction%20setColorHue(originColor%2CopacityPercent%2CmaskRGB)%20%7B%20%20%0D%0AreturnColor%3Dnew%20Array()%3B%20%20%0D%0Afor(w%3D0%3Bw%3CoriginColor.length%3Bw%2B%2B)%20returnColor%5Bw%5D%20%3D%20Math.round(originColor%5Bw%5D*opacityPercent)%20%2B%20Math.round(maskRGB%5Bw%5D*(1.0-opacityPercent))%3B%20%20%0D%0Areturn%20returnColor%3B%20%20%0D%0A%7D%20%20%0D%0Afunction%20longHexToDec(longHex)%20%7B%20%20%0D%0Ar%3DtoDec(longHex.substring(0%2C2))%3B%20%20%0D%0Ag%3DtoDec(longHex.substring(2%2C4))%3B%20%20%0D%0Ab%3DtoDec(longHex.substring(4%2C6))%3B%20%20%0D%0Areturn%20new%20Array(r%2Cg%2Cb)%3B%20%20%0D%0A%7D%20%20%0D%0Afunction%20toHex(dec)%20%7B%20%20%0D%0Ahex%3Ddec.toString(16)%3B%20%20%0D%0Aif(hex.length%3D%3D1)hex%3D%220%22%2Bhex%3B%20%20%0D%0Aif(hex%3D%3D100)hex%3D%22FF%22%3B%20%20%0D%0Areturn%20hex.toUpperCase()%3B%20%20%0D%0A%7D%20%20%0D%0Afunction%20toDec(hex)%20%7B%20%20%0D%0Areturn%20parseInt(hex%2C16)%3B%20%20%0D%0A%7D%20%20%0D%0A%3C%2Fscript%3E">
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程