一步一步教你制作自己的校内网代码,绝对经典,人气日增一千!
先去看看效果吧: http://xiaonei.com/getuser.do?id=222087419
关于页面我会跟大家详细讲解,希望得到大家的支持!!
有不周到的地方还望指出,以便我改进......
现在跟大家讲解一下吧:
<声明:只为新手指路,不是班门弄斧,纯属交流,有不对的,多多指出,深表感谢!!>
首先定位整个页面,有时候页面在窗口拖动的时候挂件位置会偏离,就是因为没定位页面
<style type=text/css><!--#homepage{overflow:visible; width:750px; position:relative; left:10px; } --></style><!-移动homepage->
这便是页面移动,很有用的.
注意:里面的数字是控制布局位置用的,可以根据情况改变,以下代码也是。
然后就是加宽页面,设置边框等
<!--使页面居中,加宽,设置边框--><style type=text/css><!--
#content{float:none;MARGIN-RIGHT:none;MARGIN-LEFT:none;width:968px;border:solid 1px #0066CC;padding:10px;}--></style>
然后设置背景图片。我用的是雨滴,夏天到了,显得清新,凉快,你觉得呢?
代码如下:
<body background="http://eed.xmu.edu.cn/myfile/zidou1/tianchong/62.gif"bgproperties="fixed"><!--背景-->
再下一阵雨不就更凉快了?!
<embed style="position: absolute;top: 50px; left: 150px;" align="right" src="http://eed.xmu.edu.cn/myfile/zidou/flash/7.swf"width="1000" height="500" quality="high" wmode="transparent"></embed><!--下雨flash-->,
这是下雨的。
广告有时候很扎眼,可以隐藏他
<!--隐藏大学生互动空间/你好/ LOGO/导航栏/广告布告推荐/底部链接/侧边拦-->
<style type=text/css><!--#tagline,#utility,#logo,.block,#permalink,#sidebar{display:none;}--></style>
<!--用户等级(星星加9颗)--> <style type=text/css><!--
#userProfile .stat{BACKGROUND:url(http://fm041.img.xiaonei.com/tribe/20070502/1255/A1992180RO.gif)
no-repeat left top;padding-left:110px;}#star1,#userProfile .rank{float:right;display:none;}
--></style> 这个大家应该知道,美化页面加星星用的。
我们还可以加一些挂件,美化页面呀。我加的挂件有以下几个:
<!--蓝蝴蝶挂件-->
<DIV id=kongfu style="LEFT:200px; POSITION: absolute; TOP: 60px"><img src="http://source.5q.com/photo/storage/topic/68/31/74/200126717//1149573409119.gif" border=0></A></DIV>
<DIV style="LEFT:305px; POSITION: absolute; TOP: 170px" align=left>
<IMG src="http://source.xiaonei.com/tribe/20070205/0000/orig1706817.gif" align=left></DIV><!--挂件--><!--彩色蝴蝶-->
<div style="position:absolute;Top:380px;left:315px;width:100px;height:128px;"><embed src="http://eed.xmu.edu.cn/myfile/zidou/clock/4.swf"width="140" height="140" quality="high" wmode="transparent"></embed> </div>
<!--钟-->
<div >
<DIV style="left: 800px; POSITION: absolute; TOP: -10px" align=left><IMG src="http://fm022.img.xiaonei.com/tribe/20070415/1120/A7243839MG.gif" align=left></DIV><!-流星雨->
光加挂件还不行,加一些会动的,雪花、蝴蝶、蜻蜓、金鱼,是不是感觉更好了?
虽然不符合现实,不过看起来挺好的,看着爽就行了,何必在意那么多?
代码:<embed style="left: 0px; width: 1000px; position: absolute; top: 0px; height: 800px" align=right src="