防百度空间的下拉框显示颜色及图片的特效代码
2009-10-14 09:03
375 查看
Code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>防百度空间的下拉框显示颜色及图片的特效代码 - www.webdm.cn</title>
<style type="text/css">
<!--
body{ margin:0; padding:0; font-size:12px}
.lb_color,.lb_layout{position:relative; float:left;z-index:99;cursor:pointer;border:1px solid #999;background:url(http://www.webdm.cn/images/20090925/arrow2.gif) no-repeat right 2px #FFF; line-height:22px; height:22px; }
.lb_color{ width:80px; margin-right:5px}
.lb_layout{ width:110px}
.color_over{background:#EEE}
.layout_over{background:#EEE}
#lbarea_color{width:58px; height: 20px; line-height:16px;}
#lbarea_layout{width:90px;height: 20px; line-height:16px;}
.mdiv_color{ background:#000; border:1px solid #999; border-top: 0; background:#fff; WIDTH: 80px; position:absolute; z-index:-1; top:22px; left:-1px }
.mdiv_layout{ background:#000; border:1px solid #999; border-top: 0; background:#fff; WIDTH:110px; position:absolute; z-index:-1; top:22px; left:-1px }
-->
</style>
<script src="http://www.webdm.cn/images/20090925/mdiv.js" type="text/javascript"></script>
</head>
<body>
<div class="lb_color" id="selcolor">
<div id="lbarea_color">选择色调</div>
</div>
<div class="lb_layout" id="sellayout">
<div id="lbarea_layout">选择适用版式</div>
</div>
<script type="text/javascript">
window.onload=function(){
mdiv_color.init(G('selcolor'), G('lbarea_color'));
CreateColor();
mdiv_layout.init(G('sellayout'), G('lbarea_layout'));
CreateLayout();
var cSn=7-1;
if(cSn<0) cSn=0;
mdiv_color.select(mdiv_color.items[cSn]);
mdiv_layout.select(mdiv_layout.items[-1+1]);
}
function G(id){
return document.getElementById(id);
}
mdiv.prototype.autoHeight=function(){
var H=document.body.scrollHeight;
window.scrollTo(0,H);
};
mdiv.prototype.HideSome=function()
{
if(G('ft')) G('ft').id="dropTemp";
}
mdiv.prototype.ShowSome=function()
{
if(G('dropTemp')) G('dropTemp').id="ft";
}
var mdiv_color = new mdiv();
var mdiv_layout = new mdiv();
function CreateCDiv(B,C,T,cV)
{
var c=document.createElement("div");
c.innerHTML='<div style="cursor:pointer;background:'+B+';color:'+C+';padding:1px 4px;text-align:center;margin:2px">'+T+'色系</div>';
mdiv_color.add(c,"color_over", cV);
}
function CreateBDiv(pic,T,bV)
{
var c=document.createElement("div");
c.innerHTML='<div style="cursor:pointer;margin:2px"><img src="http://img.baidu.com/hi/img/'+pic+'" border="0" align="absmiddle"> 版式'+T+'</div>';
mdiv_layout.add(c,"layout_over", bV);
}
function CreateColor(){
//CreateCDiv('','#000','所有',0);
CreateCDiv('#333','#CCC','黑',1);
CreateCDiv('#FFF','#000','白',2);
CreateCDiv('#FFB6C1','#000','粉',3);
CreateCDiv('#0099FF','#000','蓝',4);
CreateCDiv('#66CC00','#000','绿',5);
CreateCDiv('#FF0000','#000','红',6);
CreateCDiv('#5A493F','#000','棕',7);
CreateCDiv('#C0C0C0','#000','灰',8);
CreateCDiv('#FFCC00','#000','黄',9);
CreateCDiv('','#000','其他',10);
mdiv_color.select(mdiv_color.items[9]);
}
function CreateLayout(){
var c=document.createElement("div");
c.innerHTML='<div style="cursor:pointer;padding:1px;margin:2px"> 所有适用版式</div>';
mdiv_layout.add(c,"layout_over", -1);
CreateBDiv('moban_layout1.gif','一',0);
CreateBDiv('moban_layout2.gif','二',1);
CreateBDiv('moban_layout3.gif','三',2);
CreateBDiv('moban_layout4.gif','四',3);
CreateBDiv('moban_layout5.gif','五',4);
CreateBDiv('moban_layout6.gif','六',5);
mdiv_layout.select(mdiv_layout.items[0]);
}
</script>
<br>若出现JS错误,请点击“刷新”,让网页重新载入。
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>防百度空间的下拉框显示颜色及图片的特效代码 - www.webdm.cn</title>
<style type="text/css">
<!--
body{ margin:0; padding:0; font-size:12px}
.lb_color,.lb_layout{position:relative; float:left;z-index:99;cursor:pointer;border:1px solid #999;background:url(http://www.webdm.cn/images/20090925/arrow2.gif) no-repeat right 2px #FFF; line-height:22px; height:22px; }
.lb_color{ width:80px; margin-right:5px}
.lb_layout{ width:110px}
.color_over{background:#EEE}
.layout_over{background:#EEE}
#lbarea_color{width:58px; height: 20px; line-height:16px;}
#lbarea_layout{width:90px;height: 20px; line-height:16px;}
.mdiv_color{ background:#000; border:1px solid #999; border-top: 0; background:#fff; WIDTH: 80px; position:absolute; z-index:-1; top:22px; left:-1px }
.mdiv_layout{ background:#000; border:1px solid #999; border-top: 0; background:#fff; WIDTH:110px; position:absolute; z-index:-1; top:22px; left:-1px }
-->
</style>
<script src="http://www.webdm.cn/images/20090925/mdiv.js" type="text/javascript"></script>
</head>
<body>
<div class="lb_color" id="selcolor">
<div id="lbarea_color">选择色调</div>
</div>
<div class="lb_layout" id="sellayout">
<div id="lbarea_layout">选择适用版式</div>
</div>
<script type="text/javascript">
window.onload=function(){
mdiv_color.init(G('selcolor'), G('lbarea_color'));
CreateColor();
mdiv_layout.init(G('sellayout'), G('lbarea_layout'));
CreateLayout();
var cSn=7-1;
if(cSn<0) cSn=0;
mdiv_color.select(mdiv_color.items[cSn]);
mdiv_layout.select(mdiv_layout.items[-1+1]);
}
function G(id){
return document.getElementById(id);
}
mdiv.prototype.autoHeight=function(){
var H=document.body.scrollHeight;
window.scrollTo(0,H);
};
mdiv.prototype.HideSome=function()
{
if(G('ft')) G('ft').id="dropTemp";
}
mdiv.prototype.ShowSome=function()
{
if(G('dropTemp')) G('dropTemp').id="ft";
}
var mdiv_color = new mdiv();
var mdiv_layout = new mdiv();
function CreateCDiv(B,C,T,cV)
{
var c=document.createElement("div");
c.innerHTML='<div style="cursor:pointer;background:'+B+';color:'+C+';padding:1px 4px;text-align:center;margin:2px">'+T+'色系</div>';
mdiv_color.add(c,"color_over", cV);
}
function CreateBDiv(pic,T,bV)
{
var c=document.createElement("div");
c.innerHTML='<div style="cursor:pointer;margin:2px"><img src="http://img.baidu.com/hi/img/'+pic+'" border="0" align="absmiddle"> 版式'+T+'</div>';
mdiv_layout.add(c,"layout_over", bV);
}
function CreateColor(){
//CreateCDiv('','#000','所有',0);
CreateCDiv('#333','#CCC','黑',1);
CreateCDiv('#FFF','#000','白',2);
CreateCDiv('#FFB6C1','#000','粉',3);
CreateCDiv('#0099FF','#000','蓝',4);
CreateCDiv('#66CC00','#000','绿',5);
CreateCDiv('#FF0000','#000','红',6);
CreateCDiv('#5A493F','#000','棕',7);
CreateCDiv('#C0C0C0','#000','灰',8);
CreateCDiv('#FFCC00','#000','黄',9);
CreateCDiv('','#000','其他',10);
mdiv_color.select(mdiv_color.items[9]);
}
function CreateLayout(){
var c=document.createElement("div");
c.innerHTML='<div style="cursor:pointer;padding:1px;margin:2px"> 所有适用版式</div>';
mdiv_layout.add(c,"layout_over", -1);
CreateBDiv('moban_layout1.gif','一',0);
CreateBDiv('moban_layout2.gif','二',1);
CreateBDiv('moban_layout3.gif','三',2);
CreateBDiv('moban_layout4.gif','四',3);
CreateBDiv('moban_layout5.gif','五',4);
CreateBDiv('moban_layout6.gif','六',5);
mdiv_layout.select(mdiv_layout.items[0]);
}
</script>
<br>若出现JS错误,请点击“刷新”,让网页重新载入。
</body>
</html>
相关文章推荐
- 代码: 两列图片瀑布流(一次后台取数据,图片懒加载。下拉后分批显示图片。图片高度未知,当图片onload后才显示容器)
- js鼠标移上去当前放大图片突出显示特效代码
- 实现选择下拉列表中时间而显示图片后台代码
- 应用键横竖屏切换;label中显示图片;不同类型设备适配的代码;UIWebView字体大小、字体颜色、背景色的设置;
- JS实现从顶部下拉显示的带动画QQ客服特效代码
- JS实现从顶部下拉显示的带动画QQ客服特效代码
- 自己春节要写的网站特效-自由变化广告图片显示代码
- [Android开发] 代码code设置9.png/9-patch 图片背景后,此view中的TextView等控件显示不正常(常见于listview中)
- 在div底部显示背景图片实现代码
- js点击更换背景颜色或图片的实例代码
- DrawGrid 做图片显示 代码简单 参考性强 (Delphi7)
- 超赞的jQuery图片滑块动画特效代码汇总
- LightBox当前页特效显示图片
- 在图片上显示左右箭头类似翻页的代码
- jQuery css3鼠标悬停图片显示遮罩层动画特效
- SSH 技术—— 分页 、图片集合显示出来代码
- 可拖拽、拼接、放大图片的jQuery相册特效代码
- 关于微信小程序下拉刷新组件加载图片(三个小点)不显示的问题
- Java中JLabel设置背景颜色,设置图片标签,重叠显示
- JS实现的防Windows的图片放大特效代码