网页特效
建站首页
|
广告代码
|
源码下载
|
站长工具
|
字体下载
|
网页模板
|
收藏本站
|
设为首页
网站首页
菜单导航
日期时间
背景图像
图层样式
鼠标键盘
页面窗口
色彩表格
链接文字
表单按钮
计数转换
游戏娱乐
综合实例
特效
热门搜索:
特效代码
js脚本
导航菜单
热点推荐:
英文字体
人民币汇率
dw插件
站长常用软件
alexa排名查询
您的位置:
网页特效
->
色彩表格
-> 改变背景的颜色网页特效代码
改变背景的颜色网页特效代码
作者:改变背景的颜色 网页特效代码演示 发布时间:2007-11-20 8:46:10 发布人: admin
<style>.drag { CURSOR: hand; POSITION: relative } </style> <script> var sPosition; var showPerc=100; document.onmousedown=dragLayer document.onmouseup=new Function("dragMe=false") var Color= new Array(); Color[0] = "00"; Color[1] = "11"; Color[2] = "22"; Color[3] = "33"; Color[4] = "44"; Color[5] = "55"; Color[6] = "66"; Color[7] = "77"; Color[8] = "88"; Color[9] = "99"; Color[10] = "AA"; Color[11] = "BB"; Color[12] = "CC"; Color[13] = "DD"; Color[14] = "EE"; Color[15] = "FF"; var rVal,gVal,bVal, cCol function chgBg() { cCol = document.bgColor; rVal=cCol.substr(1,2); gVal=cCol.substr(3,2); bVal=cCol.substr(5,2); ind = Math.round(showPerc/16); if (ind < 0) ind = 0; if (ind > 15) ind=15; if (kObj.id =="knobImg") document.bgColor="#"+Color[ind]+gVal+bVal; if (kObj.id =="knobImg1") document.bgColor="#"+rVal+Color[ind]+bVal; if (kObj.id =="knobImg2") document.bgColor="#"+rVal+gVal+Color[ind]; } var dragMe=false, kObj, yPos,direction function moveLayer() { if (event.button==1 && dragMe) { oldY = kObj.style.pixelTop; kObj.style.pixelTop=temp2+event.clientY-yPos; if (kObj.style.pixelTop > oldY) direction="dn"; else direction="up"; if (kObj.style.pixelTop < 2 && direction=="up") {kObj.style.pixelTop=2; direction="dn";} if (kObj.style.pixelTop > 102 && direction=="dn") {kObj.style.pixelTop=102; direction="up";} sPosition=kObj.style.pixelTop; showPerc = (perCent[0].checked) ? sPosition-2 : (sPosition-2)/2*5; chgBg(); return false; } } function dragLayer() { if (!document.all) return; if (event.srcElement.className=="drag") {dragMe=true; kObj=event.srcElement; temp2=kObj.style.pixelTop; yPos=event.clientY; document.onmousemove=moveLayer; } } </script> </div> <p> <div id="outerLyr" style="BACKGROUND-COLOR: #000000; HEIGHT: 120px; LEFT: 233px; POSITION: absolute; TOP: 111px; WIDTH: 23px; Z-INDEX: 1"><img src="/web/20150530110909im_/http://myjs.jz123.cn/js/secai/test/ti.bmp" style="HEIGHT: 17px; LEFT: 2px; TOP: 100px; WIDTH: 20px; Z-INDEX: 3" onclick="javascript:window.open(this.src);" style="CURSOR: pointer" onload="return imgzoom(this,550)"> <div id="innerLyr" style="BACKGROUND-COLOR: #777777; HEIGHT: 117px; LEFT: 2px; POSITION: absolute; TOP: 2px; WIDTH: 20px; Z-INDEX: 2"> <div id="barLyr" style="BACKGROUND-COLOR: #000000; HEIGHT: 110px; LEFT: 9px; POSITION: absolute; TOP: 5px; WIDTH: 2px; Z-INDEX: 1"></div></div></div> <div id="outerLyr1" style="BACKGROUND-COLOR: #000000; HEIGHT: 120px; LEFT: 268px; POSITION: absolute; TOP: 111px; WIDTH: 23px; Z-INDEX: 1"><img src="/web/20150530110909im_/http://myjs.jz123.cn/js/secai/test/ti.bmp" style="HEIGHT: 17px; LEFT: 2px; TOP: 100px; WIDTH: 20px; Z-INDEX: 3" onclick="javascript:window.open(this.src);" style="CURSOR: pointer" onload="return imgzoom(this,550)"> <div id="innerLyr1" style="BACKGROUND-COLOR: #777777; HEIGHT: 117px; LEFT: 2px; POSITION: absolute; TOP: 2px; WIDTH: 20px; Z-INDEX: 2"> <div id="barLyr1" style="BACKGROUND-COLOR: #000000; HEIGHT: 110px; LEFT: 9px; POSITION: absolute; TOP: 5px; WIDTH: 2px; Z-INDEX: 1"></div></div></div> <div id="outerLyr2" style="BACKGROUND-COLOR: #000000; HEIGHT: 120px; LEFT: 300px; POSITION: absolute; TOP: 111px; WIDTH: 23px; Z-INDEX: 1"><img src="/web/20150530110909im_/http://myjs.jz123.cn/js/secai/test/ti.bmp" style="HEIGHT: 17px; LEFT: 2px; TOP: 100px; WIDTH: 20px; Z-INDEX: 3" onclick="javascript:window.open(this.src);" style="CURSOR: pointer" onload="return imgzoom(this,550)"> <div id="innerLyr2" style="BACKGROUND-COLOR: #777777; HEIGHT: 117px; LEFT: 2px; POSITION: absolute; TOP: 2px; WIDTH: 20px; Z-INDEX: 2"> <div id="barLyr2" style="BACKGROUND-COLOR: #000000; HEIGHT: 110px; LEFT: 9px; POSITION: absolute; TOP: 5px; WIDTH: 2px; Z-INDEX: 1"></div></div></div> <input name="perCent" type="radio" value="false"> Prozent <input checked name="perCent" type="radio" value="true"> 255 <a href="http://web.archive.org/web/20150530110909/http://myjs.jz123.cn/">欢迎访问中国建站之家网页特效集</a>
改变背景的颜色 网页特效代码演示
将本文收藏到QQ书签与更多好友分享
上一篇:文章:
一个很酷的登陆效果
下一篇:文章:
清爽配色15套网页特效代码
本类浏览排行 »
搜索页面中的内容
又一款综合搜索引擎代码
标题栏显示当前时间
倒影效果的电子表,显示当前时间
自动记录当前页面最新的更新日期
JS让网页每隔2秒弹出一次对话框
一款超酷的CSS列表排行榜
鼠标悬停放大的纯CSS分页效果
本站推荐文章 »
垂直三栏自适应等高布局
仿QQ消息管理器的文本内容样式
支付宝的控制台动画效果菜单
文字、图片拖曳移动
可拉伸移动的DIV层效果
很酷的图片伸缩放大功能
较好的视觉效果的网页选项卡
CSS实例:通过定义渐变边框给图片加阴影