收藏此页

校内网代码

校内网代码>校内网教程> 校内网css标签详解

校内代码

校内网css标签详解

关键词:校内网代码 收藏到书签】【添加到百度搜藏】【留言建议

-.页面整体概述:

#homepage  页面全部元素

#header   顶部导航栏

#footer   底部导航栏

#sidebar  左侧导航栏

#content  #homepage中除#header、#footer和#sidebar外其余部分

#userInfo  个人照片和用户行为部分

#userVisitor  最近访问好友

#userFriend   最近登陆好友

#userFriendUniv  外校好友

#userProfile  个人资料部分

#userBlog  日志部分

#userPandora  涂鸦板

=.具体实现:

1、移动homepage

<style type=text/css><!--#homepage{overflow:visible; width:750px; position:relative; left:270px; } --></style><!-移动homepage->

参数说明:

overflow:visible :此处不做说明,在后面一起说明。

position : relative :  对象不可层叠,但将依据left,right,top,bottom等属性在正常文档流中偏移位置。用通俗点的话讲,就是在当前所在的框架内移动,而不流出。

width:宽度。如有需要,可以加个height参数调整高度。

left:相对移动距离。正值为向右移动,负值为向左移动。这个值要结合content一起调整,开始给270px这个值时,会使homepage部分偏右,而调整content后,页面将回到居中位置。

当然,如果有需要,还可以加上top参数,以调整垂直方向的位置。

2、移动content

<style type=text/css><!--#content{overflow:visible; width:750px; position:relative; left:-150px; } --></style><!-移动content->

参数意义同上
这里因为移走了sidebar,所以这里的width取值与homepage相同。

3、加宽及移动个人资料、相册、日志和涂鸦板

<style type=text/css><!--#userProfile{width:540px; position:relative; left:-145px; } --></style><!-移动个人资料->

<style type=text/css><!--#userAlbum{width:540px; position:relative; left:-145px; } --></style><!-移动相册->

<style type=text/css><!--#userBlog{width:540px; position:relative; left:-145px; } --></style><!-移动日志->

<style type=text/css><!--#content #userPandora {overflow:visible; width:750px; position:relative; left:-355px; } --></style><!-移动涂鸦板->

参数意义同上


收藏此页 | 推荐好友 | QQ空间代码 | 返回顶部 |