切换到宽版
  • 8495阅读
  • 0回复

[转帖]百度空间装饰代码解析(2) [复制链接]

上一主题 下一主题
 
只看楼主 倒序阅读 0楼  发表于: 2009-03-21
转载自 http://hi.baidu.com/wawawish

/*弹出窗口*/
#comm_info 和#comm_info a 替换#comm_info a{color:#D77B18 border: 1px solid #000000; padding: 10px; background-image: url('javascript:alert("你要说的话");')}

#comm_info{}或#m_links div.item{}
添加
background:url(javascript:alert(你要说的内容))

/*鼠标样式*/
平常状态 body{}中加入CURSOR: url('http://***.ani');
链接状态 a:hover{}中加入CURSOR: url('http://***.ani');

/*文章在新窗口中打开*/
a:active { text: (target="_blank");}

/*屏蔽Rss链接,baidu图片*/
#comm_info a {display:none;}

/*大背景*/
body{}中加入background:url(http://***.gif) repeat-x #FFFFFF

/*标题背景*/
#header div.lc{} -左
#header div.rc{} -右
插入 background:url(http://***)

/*百度空间 进入后弹出对话框*/
去掉#comm_info div.line 把#comm_info a换成
#comm_info a{color:#D77B18 border: 1px solid #000000; padding: 10px; background-image: url('javascript:alert("你要说的话");')}

/*文章日期旁加小图案*/
#m_blog div.date
{text-indent:1.5cm;background:url(这里要填上你自己选的小图片的连接地址) 30% 0% no-repeat; /*背景图片*/margin:5px 0 8px 0;color:#999999;
line-height:50px; /*调整行高*/}

/*常用插入时间图片位置的代码*/
图片显示位置——个人档案照片下面:
#m_pro div.act{margin-top:5px; background:url(http://escati.linkopp.net/cgi-bin/date.cgi?trgb=red&;srgb=red&prgb=red&timezone=GMT-0500) no-repeat bottom; padding-bottom: 22px; margin-bottom: 6px; }

图片显示位置——文章列表 标题下面:
#m_blog div.tit{font-size:14px;font-weight:bold; background:url(http://escati.linkopp.net/cgi-bin/date.cgi?trgb=red&;srgb=red&prgb=red&timezone=GMT-0500) no-repeat bottom; padding-bottom: 22px; margin-bottom: 6px; }

图片显示位置——文章列表 标题左面:
#m_blog div.tit{font-size:14px;font-weight:bold; line-height:24px; text-indent:120px; background:url(http://escati.linkopp.net/cgi-bin/date.cgi?trgb=red&;srgb=red&prgb=red&timezone=GMT-0500) no-repeat; }

图片显示位置——TAB导航栏:
#tabline{top:89px; background:url(http://escati.linkopp.net/cgi-bin/date.cgi?trgb=red&;srgb=red&prgb=red&timezone=GMT-0500) no-repeat bottom; padding-bottom: 32px; margin-bottom: 6px; }

图片显示位置——相册下面:
#m_album div.image{text-align:center; background:url(http://escati.linkopp.net/cgi-bin/date.cgi?trgb=red&;srgb=red&prgb=red&timezone=GMT-0500) no-repeat bottom; padding-bottom: 45px; margin-bottom: 1px; }

图片显示位置——每个友情链接下面:
#m_links div.line{margin-top:5px;line-height:8px;border-top:1px solid #F4C1B5; background:url(http://escati.linkopp.net/cgi-bin/date.cgi?trgb=red&;srgb=red&prgb=red&timezone=GMT-0500) no-repeat bottom; padding-bottom: 16px; margin-bottom: 10px; }

图片显示位置——每个最新评论下面:
#m_comment div.item{color:#000000;font-size:12px; background:url(http://escati.linkopp.net/cgi-bin/date.cgi?trgb=red&;srgb=red&prgb=red&timezone=GMT-0500) no-repeat bottom; padding-bottom: 22px; margin-bottom: 6px; }

图片显示位置——每个文章分类下面:
#m_artclg div.line{margin-top:5px;line-height:8px;border-top:1px solid #F4C1B5; background:url(http://escati.linkopp.net/cgi-bin/date.cgi?trgb=red&;srgb=red&prgb=red&timezone=GMT-0500) no-repeat bottom; padding-bottom: 16px; margin-bottom: 10px; }

图片显示位置——其他区域:
#comm_info div.line{margin-top:5px;line-height:8px;border-top:1px solid #BBC1C6; background:url(http://escati.linkopp.net/cgi-bin/date.cgi?trgb=red&;srgb=red&prgb=red&timezone=GMT-0500) no-repeat bottom; padding-bottom: 22px; margin-bottom: 6px; }

/*分割线*/
{margin-top:17px;line-height:12px;background:url(http://***.gif) repeat-x}

/*<其它>模块中只显示访问人数*/
#comm_info a {display:none}

/*发光效果*/
{}中加入filter:glow (color= #299BE8,strength=2);

/*阴影效果字体阴影*/
{}中加入filter:DropShadow(Color=#000000:,OffX=2, OffY=3,Positive=1);或filter:shadow(Color=#000000:,OffX=2, OffY=3,Positive=1);
参数作用:
Color=阴影的颜色代码
OffX=设置阴影与对象(文字或图片)的横向距离偏移
OffY=设置阴影与对象的竖向距离偏移
Positive=设置建立阴影的对象,true是为非透明像素建立阴影,false是为透明的像素建立阴影,一般不建议使用false
另 外,如果添加阴影的地方已经有了filter的参数,例如设置透明度的filter:alpha(),只需把 DropShadow(Color=#000000, OffX=3, OffY=3, Positive=true)添加到alpha()的后面即可,这里不需要间隔,当中留空格可以,间隔将无效
例如在原来的filter:alpha(opacity=50);后面加上阴影效果代码:
filter:alpha(opacity=50)DropShadow(Color=#000000, OffX=3, OffY=3, Positive=true);

/*投影的代码*/
filter:Shadow(Color=gray/*颜色*/,Direction=135/*方向*/)

/*文章标题背景*/
#m_blog div.tit{text-indent:1.5cm/*缩近*/;line-height:75px;/*增大行高,使背景图片完全显示*/font- size:16px;font-weight:bold;background:url(http://***.gif) no-repeat;/*标题背景图片,不重复*/}
line-height:多少px; 设置标题的高度,其实这里的设置为图片的高度就可以了
text-indent:多少px; 设置标题的文本前面空多少宽度,这里可以填图片的宽度,为了美观起见,可以再多+5、6px,因为图片和标题贴着不好看,这个主要还是看个人感觉和喜好设置了

/*空间透明*/
.modbox,.modbl,.modbc,.modbr{filter:alpha(opacity=80);-moz-opacity:0.8;width:auto !important;width:100%}

/*添加自己的LOGO图片*/
#comm_info div.line{margin-top:4px;line-height:8px;border-top:2px solid #ff3333; background:url(http://***.gif) no-repeat bottom; padding-bottom: 32px; margin-bottom: 32px}

/*添加LOGO*/
#m_pro div.image{}加入background:url(http://***.jpg) no-repeat bottom;padding-bottom:100px
bottom让图片沉底
padding-bottom增加头像模块底下的宽度
padding-bottom数值一般设置为LOGO的高度值,LOGO的上边与头像的下边距离0,加大padding-bottom的数值,LOGO的上边与头像的下边距离亦加大

/*给评论框加背景图片*/
#spBlogCmtText {border: 8px solid #000000 ;
background:url(图片地址) no-repeat top center;
background-attachment: fixed;}

/*如何设定+固定百度空间的背景*/
在body{}中加入
background-image:url(图片地址) ;   定义背景图片
background-repeat: no-repeat; 定义背景图片不重复
background-position: center; 定义背景居中
background-attachment: fixed; 定义背景固定,不滚动参数fixed

/*去除模块背景即完全背景透明*/
删除模块background-color:……的属性;加background:transparent即可
在header{}中加入
background:transparent 这个参数的作用是使完全背景透明,并删除原来的属性background:url(……)
#header div.rc{}以及.stage{}与header{}同样设置

/*右下角弹出窗口*/
#main{
background:url('javascript:
var sunPop = window.createPopup();
var popTop=50;
function popmsg(msgstr){
var winstr="<table style=\"border:solid #A96D13 1px-:special:1:- width=-:special:1:-200-:special:1:- height=-:special:1:-150-:special:1:- border=-:special:1:-0-:special:1:- cellpadding=-:special:1:-0-:special:1:- cellspacing=-:special:1:-0-:special:1:- bgcolor=-:special:1:-#88CFFF-:special:1:- >";
winstr+="<tr><td height=-:special:1:-30-:special:1:-> </td></tr><tr><td align=-:special:1:-center-:special:1:-><table width=-:special:1:-90%-:special:1:- height=-:special:1:-110-:special:1:- border=-:special:1:-0-:special:1:- cellpadding=-:special:1:-0-:special:1:- cellspacing=-:special:1:-0-:special:1:->";
winstr+="<tr><td valign=-:special:1:-top-:special:1:- style=-:special:1:-font-size:12px; color:#209C20; face:黑体-:special:1:->"+msgstr+"</td></tr></table>< /td></tr></table>";
sunPop.document.body.innerHTML=winstr;
popshow();
}
function popshow(){
window.status=popTop;
if(popTop>1720){
clearTimeout(mytime);
sunPop.hide();
return;
}else if(popTop>1520&&popTop<1720){
sunPop.show(screen.width-250,screen.height,200,1720-popTop);
}else if(popTop>1500&&popTop<1520){
sunPop.show(screen.width-250,screen.height+(popTop-1720),200,150);
}else if(popTop<180){
sunPop.show(screen.width-250,screen.height,200,popTop);
}else if(popTop<220){
sunPop.show(screen.width-250,screen.height-popTop,200,150);
}
popTop+=10;
var mytime=setTimeout("popshow();",50);
}
popmsg("2006年12月1日<br>你好,亲爱得朋友。<br>你要说的话。<br>你要说的话~");
')
}

/*“发表评论”区域*/
#in_send div.tit{margin:10px 0 10px 0;color:#FFFFFF;font-size:14px;font-weight:bold}

设置“发表评论”区域上方的“发表评论”四个大字,其中color:#FFFFFF设置字的颜色,font-size设置字的大小,font-weight:hold设置让这字体加粗,不加粗删掉。

#in_send td{color:#FFFFFF}

设置“姓名”、“网址或邮箱”和“内容”字的颜色。

#spBlogCmtText {border: 1px solid #FFCCFF;background:#FFFFFF no-repeat top center; background-attachment: fixed}

设置评论框底色。background:#FFFFFF设置颜色,添加图片则改为background:url(图片),
图片最佳尺寸是503*153 1px 表示评论边框的宽度 #FFCCFF 表示评论边框的颜色。

/*隐藏“查看该用户在百度的”分类*/
加入#m_pro .basic a.nlk{display:none}代码即可

/*隐藏“百度空间测试版”*/
#m_comm_info img{display:none} \*a7DuVw  
[此贴子已经被作者于2009-3-20 23:11:39编辑过]
分享到
快速回复
限60 字节
 
上一个 下一个