热门关键字:  隐藏访问总人数  光电信息工程  班级  足球  奥运会
当前位置 :| 校内网首页>校内网教程>

校内网涂鸦版实用小技巧

来源:www.xiaon.org.cn 作者:校内网 时间:2008-01-24 Tag: 点击:

1、日志长度限制,加滚动条

现在日志又提供最后一篇预览,可能出现由于日志内容过长,导致页面过长的情况,可以用下面代码限制日志长度

<style type=text/css><!--#userBlog .text{height:200px;overflow-y:auto;} --></style><!--日志长度限制-->

height的值限制高度,自行调整,overflow:auto;为加滚动条,另外如果想让垂直滚动条一直显示,可以用overflow-y:scroll;

 
2、留言板长度限制,加滚动条(参考了Maple同学的源代码)

有校内网同学嫌留言板过长,影响页面整体效果,可以用下面代码加以限制

<style type=text/css><!--#talk{max-height:500px;overflow:auto;height:expression((this.height<500)?\"auto\":\"500px\");overflow:expression((this.height<500)?\"visible\":\"auto\");} --></style><!--留言板长度限制-->

其中的500px为高度限制,留言板高度超过500px将出现滚动条,这个值可自行修改为自己满意的值
这个也可以按照第1条的方式,去掉判断语句,代码改为如下形式,会精简些

<style type=text/css><!--#talk{height:500px;overflow:auto;}--></style><!--留言板长度限制-->


3、外校好友栏限制长度,加滚动条

有校内同学的外校好友栏也比较长,可用如下代码加以限制

<style type=text/css><!--#userFriendUniv{height:200px;overflow-y:auto;} --></style><!--外校好友栏加滚动条-->

不想出现滚动条,把overflow-y:auto;去掉即可


4、替换顶部banner(基本代码来自侯现耀同学,稍加整理)

<style type=\"text/css\"><!--#header{width:500px; position:relative; left:215px; } #header{margin:0;padding-top:40px; background-image:url(图片地址);background-repeat: no-repeat ;}; #logo,#navigation, h1,h2, #universityName{display:none;}; --></style>

其中的width值用来修改显示区域宽度(不是图片宽度),left值用来调整距左侧距离,padding-top值用来调整高度

 

5、页面各栏背景透明代码

校内网页面全透明代码(保留留言小头像)
<link rel=stylesheet href=\"http://img.xiaonei.com/photos/20060816/0940/orig14509.css\" type=\"text/css\" type=\"text/css\"><!--页面透明-->
页面全透明代码(去留言小头像)
<link rel=stylesheet href=\"http://img.xiaonei.com/photos/20060816/0940/orig14520.css\" type=\"text/css\" type=\"text/css\"><!--页面透明-->

校内网今天又更新(汗流不止ing……),用了上面去留言小头像的,会出现留言不能左对齐,替换为下面的代码即可,若有改动,大家提出来,我们会及时更新代码
<link rel=stylesheet href=\"http://img.xiaonei.com/photos/20060910/0950/orig74780.css\" type=\"text/css\" type=\"text/css\"><!--页面透明-->


6、把左边的导航换至右边

<style type=text/css><!--#sidebar{float:right;}--></style><!-把左边的导航换至右边->

 

7、顶部导航栏隐藏及透明代码(9月23日更新)
完全隐藏用下面代码

<style type=text/css> <!--#header{display:none;}--></style> <!--隐藏顶部导航栏-->

下面是分别隐藏代码

<style type=text/css> <!--#tagline{display:none;}--></style> <!--隐藏大学生互动空间-->
<style type=text/css> <!--#utility{display:none;}--></style> <!--隐藏你好***-->
<style type=text/css> <!--#navigation{display:none;}--></style> <!--隐藏站内导航-->

下面是顶部透明代码

<style type=text/css><!--#logo{display:none;}#header #tagline,#utility,.widthHeader #navigation {background:transparent;}--></style>
<!--顶部导航栏透明-->


最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册