Vml+Dhtml:制作一个应用渐变颜色效果不错的进度条
发布日期:2021-06-30 19:13:24
浏览次数:4
分类:技术文章
本文共 1106 字,大约阅读时间需要 3 分钟。
//原作:风云舞,载自: <HTML xmlns:v> <HEAD> <META http-equiv='Content-Type' content='text/html;charset=gb2312'> <Meta name='Gemeratpr' content='网络程序员伴侣(Lshdic)2004'> <TITLE>效果不错的VML进度条</TITLE> <STYLE> v/:*{behavior:url(#default#VML);} *{font-size:12px;color:;} </STYLE> </HEAD> <BODY topmargin='2' leftmargin='2'> <div style='table-Layout:fixed;width:100%;height:100%;border:1 solid black'> <v:RoundRect id='a' style='position:absolute;left:300;top:250;height:29;'> <v:Textbox inset='5px,5px,5px'><b><font color='red' id='jindu'></font></b></v:textbox> <v:fill type='gradient' id='fill1' color='blue'/> </v:RoundRect> </div> <script> //原作:风云舞,载自: var pos1=1,posall=200 //定义全局变量,pos1为当前进度,posall为总进度 function play1(){ //播放函数 if(pos1<posall)pos1+=1;else{pos1=1;fill1.color="rgb("+Math.round(Math.random()*255)+","+Math.round(Math.random()*255)+","+Math.round(Math.random()*255)+")"} a.style.width=Math.round(300/(posall/pos1));jindu.innerText=pos1+"/"+posall+","+Math.round(100/(posall/pos1))+"%" fill1.angle=Math.round(300/(posall/pos1)) } setInterval("play1()",10) //10毫秒播放一次,一般CPU保证能消化~~~ </script> </BODY> </HTML>转载地址:https://linuxstyle.blog.csdn.net/article/details/155123 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
路过,博主的博客真漂亮。。
[***.116.15.85]2024年04月10日 10时15分55秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
攻防世界web进阶区ics-05详解
2019-04-30
攻防世界web进阶区FlatScience详解
2019-04-30
攻防世界web进阶区ics-04详解
2019-04-30
攻防世界web进阶区Cat详解
2019-04-30
攻防世界web进阶区bug详解
2019-04-30
攻防世界web进阶区ics-07详解
2019-04-30
攻防世界web进阶区unfinish详解
2019-04-30
攻防世界web进阶区i-got-id-200超详解
2019-04-30
sql注入总结学习
2019-04-30
leetcode46 全排列
2019-04-30
leetcode121 买卖股票的最佳时机
2019-04-30
leetcode 122 买卖股票的最佳时机II
2019-04-30
leetcode 309 最佳买卖股票含冷冻期
2019-04-30
leetcode 714 买卖股票的最佳时机含手续费
2019-04-30
leetcode3 无重复字符的最长子串
2019-04-30
leetcode 76 最小覆盖子串
2019-04-30
leetcode 1143. 最长公共子序列
2019-04-30
leetcode 83. 删除排序链表中的重复元素
2019-04-30
智能体 Intelligent Agent
2019-04-30
Network Compression网络压缩(一)
2019-04-30