HTML 5 进度 条绑定输出结果示例及滑动条动态 调整 颜色示例
@H_ 777 _5@
使用range类型
fieldset{width:280px;h ei ght:150px;padding:10px;}
# slide{width:150px;float:left ;m arg in-bottom:20px;}
#p rev iew{width:80px;
height:80px;
float:right;
border:1px solid blue;
}
#strclr{clear:both;text-align: center ; font-weight :bold;}
#hpu:before{content:"5";font-f ami ly:webdings;color: red ;}
#hpu :after {content:url( img / ppt . jpg ); }
VAR intR,intG,intB,strColor; function setColor(){ intR=document.getElementById("txtR").value; intG=document.getElementById("txtG").value; intB=document.getElementById("txtB").value; strColor="rgb("+intR+","+intG+","+intB+")"; document.getElementById("strclr").innerHT ML =strColor; document.getElementById(" PR eview").style.backgroundColor=strColor; }
滑动条动态调整颜色
rgb(0,0,0)
%
var prg1=document.getElementById("prg"); setInterval(function(){ prg1.value+=1; output.value=prg.value; },100)
0
xxxx 大学 计算机学院文件
HTML5进度条绑定输出结果示例及滑动条动态调整颜色示例
使用range类型
fieldset{width:280px;height:150px;padding:10px;}
#slide{width:150px;float:left;mar gin -bottom:20px;}
#preview{width:80px;
height:80px;
float:right;
border:1px solid blue;
}
#strclr{clear:both;text-align:center;font-weight:bold;}
#hpu:before{content:"5";font-f am ily:webdings;color:red;}
#hpu:after{content:url(img/ppt.jpg); }
var intR,intG,intB,strColor; function setColor(){ intR=document.getElementById("txtR").value; intG=document.getElementById("txtG").value; intB=document.getElementById("txtB").value; strColor="rgb("+intR+","+intG+","+intB+")"; document.getElementById("strclr").innerHTML=strColor; document.getElementById("preview").style.backgroundColor=strColor; }
滑动条动态调整颜色
rgb(0,0,0)
%
var prg1=document.getElementById("prg"); setInterval(function(){ prg1.value+=1; output.value=prg.value; },100)
0
xxxx大学计算机学院文件
觉得 可用,就经常来吧! 欢迎评论哦!&nbs p; html5教程 ,巧夺天工,精雕玉琢。小宝典献丑了!
总结
以上是 为你收集整理的 html5教程-HTML5进度条绑定输出结果示例及滑动条动态调整颜色示例 全部内容,希望文章能够帮你解决 html5教程-HTML5进度条绑定输出结果示例及滑动条动态调整颜色示例 所遇到的问题。
如果觉得 网站内容还不错, 推荐好友。
查看更多关于html5教程-HTML5进度条绑定输出结果示例及滑动条动态调整颜色示例的详细内容...