一个非常漂亮的进度滚动条
2006-03-08 08:52
573 查看
<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>
<script languge="JavaScript">
var lightRGB = new Array(255,255,255);
initColor("#0000FF");
function initColor(Color){
var opArray=new Array(.10,.25,.50,.75,1.0);
var baseColor = longHexToDec(Color.substring(1,7));
var nColor,nHex;
for(var i=0;i<5;i++) {
nColor=setColorHue(baseColor,opArray[i],lightRGB);
nHex = toHex(nColor[0])+toHex(nColor[1])+toHex(nColor[2]);
document.all.item("marq").firstChild.firstChild.children(i).bgColor="#"+nHex;
}
}
function setColorHue(originColor,opacityPercent,maskRGB) {
returnColor=new Array();
for(w=0;w<originColor.length;w++) returnColor[w] = Math.round(originColor[w]*opacityPercent) + Math.round(maskRGB[w]*(1.0-opacityPercent));
return returnColor;
}
function longHexToDec(longHex) {
r=toDec(longHex.substring(0,2));
g=toDec(longHex.substring(2,4));
b=toDec(longHex.substring(4,6));
return new Array(r,g,b);
}
function toHex(dec) {
hex=dec.toString(16);
if(hex.length==1)hex="0"+hex;
if(hex==100)hex="FF";
return hex.toUpperCase();
}
function toDec(hex) {
return parseInt(hex,16);
}
</script>
<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>
<script languge="JavaScript">
var lightRGB = new Array(255,255,255);
initColor("#0000FF");
function initColor(Color){
var opArray=new Array(.10,.25,.50,.75,1.0);
var baseColor = longHexToDec(Color.substring(1,7));
var nColor,nHex;
for(var i=0;i<5;i++) {
nColor=setColorHue(baseColor,opArray[i],lightRGB);
nHex = toHex(nColor[0])+toHex(nColor[1])+toHex(nColor[2]);
document.all.item("marq").firstChild.firstChild.children(i).bgColor="#"+nHex;
}
}
function setColorHue(originColor,opacityPercent,maskRGB) {
returnColor=new Array();
for(w=0;w<originColor.length;w++) returnColor[w] = Math.round(originColor[w]*opacityPercent) + Math.round(maskRGB[w]*(1.0-opacityPercent));
return returnColor;
}
function longHexToDec(longHex) {
r=toDec(longHex.substring(0,2));
g=toDec(longHex.substring(2,4));
b=toDec(longHex.substring(4,6));
return new Array(r,g,b);
}
function toHex(dec) {
hex=dec.toString(16);
if(hex.length==1)hex="0"+hex;
if(hex==100)hex="FF";
return hex.toUpperCase();
}
function toDec(hex) {
return parseInt(hex,16);
}
</script>
相关文章推荐
- [分享]一个非常漂亮的进度滚动条
- [分享]一个非常漂亮的进度滚动条
- 一个非常漂亮,非常实用的万年历
- 一个非常漂亮的简约大气的table
- 一个漂亮的自定义圆形进度条
- 【FastDev4Android框架开发】非常漂亮的进度指示器AVLoadingIndicatorView的使用讲解(十八)
- 趣题:七圆定理 一个非常漂亮的结论
- 一个非常漂亮的时间轴样式timeLine
- 推荐一个设计的非常漂亮的电商网站
- VC++/MFC精讲多练#004:DIY一个漂亮的滚动条控件
- 一个部分封装的漂亮进度条
- js 实现一个非常漂亮的3D立体旋转效果h5
- DIV完全自适应的实例,利用overflow:hidden你可以去掉默认存在的滚动条,一个仿框架的div布局就非常容易了
- 一个写的非常漂亮的数据库操作类
- 非常漂亮的进度指示器AVLoadingIndicatorView
- CircleProgressBar 一个界面漂亮功能强大的圆形进度条,支持多种属性
- 一个已封装好的漂亮进度条
- 文件上传 带进度条 多种风格 非常漂亮!
- 非常漂亮的一个验证实例
- 现有以下代码,要求添加一个水品和垂直的滚动条,请高手指点,非常感谢