<DIV style="FONT-SIZE: 9pt">1)贴图:<img src="图片地址">
1)首行缩进2格:<p style="TEXT-INDENT: 2em">html使用代码大全</p>
2)加入连接:<a href="所要连接的相关地址">写上你想写的字</a>
3)在新窗口打开连接:<a href="相关地址" target="_blank">写上要写的字</a>
4)移动字体(走马灯):<marquee>写上你想写的字</marquee>
4)帖子背景音乐:<bgsound="背景音乐地址" loop=infinite>
5)字体加粗:<b>写上你想写的字</b>
6)字体斜体:<i>写上你想写的字</i>
7)字体下划线: <u>写上你想写的字</u>
字体删除线: <s>写上你想写的字</s>
9)字体加大: <big>写上你想写的字</big>
10)字体控制大小:<h1>写上你想写的字</h1> (其中字体大小可从h1-h5,h1最大,h5最小)
11)更改字体颜色:<font color="#value">写上你想写的字</font>(其中value值在000000与ffffff(16位进制)之间
12)消除连接的下划线:<a href="相关地址" style="text-decoration:none">写上你想写的字</a>
13)贴音乐:<embed src="地址" width="230" height="28" type="audio/x-pn-realaudio-plugin" controls="ControlPanel" loop="0" autostart="true" volume="100" initfn="load-types" mime-types="mime.types"></embed>
14)贴flash: <embed src="flash地址" width="宽度" height="高度">
15)贴影视文件:<img dynsrc="文件地址" width="宽度" height="高度" start=mouseover>
16)换行:<br>
17)段落:<p>段落</p>
18)原始文字样式:<pre>正文</pre>
19)换帖子背景:<body background="背景图片地址">
20)固定帖子背景不随滚动条滚动:<body background="背景图片地址" body
bgproperties=fixed>
21)定制帖子背景颜色:<body bgcolor="#value">(value值见11)
22)贴网页:<iframe src="相关地址" width="宽度" height="高度"></iframe></DIV><DIV style="FONT-SIZE: 9pt">改变文字颜色的代码:
<font color=颜色>文字</font>
(color后面可以是英文也可以是颜色代码)
发光字代码:
<table style="FILTER: glow(color=#6CABE7,direction=2)">
阴影字代码:
<table style="FILTER: dropshadow(color=#cccccc, offx=2, offy=2, positive=2);">
浮雕文字代码:
<table style="FILTER: dropshadow(color=#6699FF, offx=1, offy=1, positive=1);">
添加透明FLAHS的代码:
<embed src="flash文件地址" width="宽" height="高" type="application/x-shockwave-flash" wmode="transparent" quality="high">
跳转页面代码
<meta http-equiv="refresh" c>
风格的背景不动代码
将以下代码加在论坛简介里。效果:背景不动。
<Body bgproperties="fixed">
元素间的内容居中
<CENTER> </CENTER>
嵌入代码
<iframe border=0 vspace=0 hspace=0 marginwidth=0 marginheight=0 height=222 framespacing=0 frameborder=0 scrolling=no width=100% src=http://etxbbs/t.htm></iframe>
背景图片
<BODY bgColor=#dddddd leftMargin=2 background=http://www.kfyes.com/bbs/plugins/lovewall/lovewall.jpg topMargin=2 onload=javascript:popUp()>
背景颜色
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top bgColor=#8F2E01>内容!!!</TD></TR></TBODY></TABLE>
文字链接代码
如果您想点击某处文字会连接到另外一个网页的效果,这是超链接,代码是这样:
<a href="网站地址";>E天下</a>如果要点了这个文字以后重新打开一个窗口的话,代码是:<a href="http://cui.qq.topzj.com/forumdisplay.php?fid=23100&page=1"; target="_blank">E天下</a>
图片链接代码
如果要点一下图片就能打开一个网站的链接代码是这样的:
<a href="http://www.liukee.com/reg.asp?username=xpcjh";><img src="http://www.liukee.com/images/logo_177-51.gif"; width="150" height="100"></a>
如果要点一下图片就能打开一个网站的链接,并且重新打开一个窗口。代码是这样的:
<a href="http://www.123.com";; target="_blank"><img src="http://www.123.com/images/n/163logo.gif"; width="150" height="100"></a>上面的数字都能调节图片尺寸大小。
移动图片的代码
<marquee><img src="http://es.tom.com/images/2002/gamemm/0604/s/36.jpg";><img src="http://es.tom.com/images/2002/gamemm/0604/s/13.jpg";><img src="http://es.tom.com/images/2002/gamemm/0604/s/30.jpg";><marquee>
把里面的图片地址换成你的就行 想多放一个图片就按照格式在中间插入:
<img src="http://es.tom.com/images/2002/gamemm/0604/s/13.jpg";>
里面的图片地址自己定。
背景音乐的代码
如果想在你的网站上放上一段好听的背景音乐,代码是: <bgsound src="http://xxx.com/xxx.mid";loop=10>
<bgsound src="http://www.fan.com/midi/music.asp?id=3073";loop=30> 里面的背景音乐地址你能自己替换。
前面的是音乐地址,一般都以mid或者mp3的形式结尾 后面的数字是播放次数,下例为无限播放代码。
<bgsound balance="" src="http://www.educast.com.cn/upload/media/2006-09/12/160829316/123.mp3" volume="" loop="infinite"></bgsound>
-------------------------------------
感应鼠标抖动图片:
<style type="text/css">.shakeimage{position:relative}</style><p align="center"><img class="shakeimage" onmouseout="stoprattle(this)" height="111" alt="" width="115" src="http://art.5d.cn/SArts/2008-04/534150411650.jpg" /></p><script language="JavaScript1.2">var rector=3var stopit=0var a=1function init(which){stopit=0shake=whichshake.style.left=0shake.style.top=0}function rattleimage(){if ((!document.all&&!document.getElementById)||stopit==1)returnif (a==1){shake.style.top=parseInt(shake.style.top)+rector}else if (a==2){shake.style.left=parseInt(shake.style.left)+rector}else if (a==3){shake.style.top=parseInt(shake.style.top)-rector}else{shake.style.left=parseInt(shake.style.left)-rector}if (a<4)a++elsea=1setTimeout("rattleimage()",50)}function stoprattle(which){stopit=1which.style.left=0which.style.top=0}</script>
下拉菜单代码
1、多极菜单
<style type="text/css">/*Credits: Dynamic Drive CSS Library *//*URL: <a href="http://www.dynamicdrive.com/style/" _fcksavedurl="http://www.dynamicdrive.com/style/" _fcksavedurl="http://www.dynamicdrive.com/style/" _fcksavedurl="http://www.dynamicdrive.com/style/" _fcksavedurl="http://www.dynamicdrive.com/style/" _fcksavedurl="http://www.dynamicdrive.com/style/" _fcksavedurl="http://www.dynamicdrive.com/style/" target="_blank">http://www.dynamicdrive.com/style/</a> */.suckertreemenu ul{margin: 0;padding: 0;list-style-type: none;}/*Top level list items*/.suckertreemenu ul li{position: relative;display: inline;float: left; /*overall menu background color*/}/*Top level menu link items style*/.suckertreemenu ul li a{display: block; 90px; /*Width of top level menu link items*/padding: 1px 8px;border: 1px solid black;border-left- 0;text-decoration: none;color: navy;}/*1st sub level menu*/.suckertreemenu ul li ul{left: 0;position: absolute;top: 1em; /* no need to change, as true value set by script */display: block;visibility: hidden;}/*Sub level menu list items (undo style from Top level List Items)*/.suckertreemenu ul li ul li{display: list-item;float: none;}/*All subsequent sub menu levels offset after 1st level sub menu */.suckertreemenu ul li ul li ul{left: 159px; /* no need to change, as true value set by script */top: 0;}/* Sub level menu links style */.suckertreemenu ul li ul li a{display: block; 160px; /*width of sub menu levels*/color: navy;text-decoration: none;padding: 1px 5px;border: 1px solid #ccc;}.suckertreemenu ul li a:hover{background-color: black;color: white;}/*Background image for top level menu list links */.suckertreemenu .mainfoldericon{background: #F3F3F3 url(media/arrow-down.gif) no-repeat center right;}/*Background image for subsequent level menu list links */.suckertreemenu .subfoldericon{background: #F3F3F3 url(media/arrow-right.gif) no-repeat center right;}* html p#iepara{ /*For a paragraph (if any) that immediately follows suckertree menu, add 1em top spacing between the two in IE*/padding-top: 1em;}/* Holly Hack for IE */* html .suckertreemenu ul li { float: left; height: 1%; }* html .suckertreemenu ul li a { height: 1%; }/* End */</style><script type="text/javascript">//SuckerTree Horizontal Menu (Sept 14th, 06)//By Dynamic Drive: <a href="http://www.dynamicdrive.com/style/" target="_blank">http://www.dynamicdrive.com/style/</a>var menuids=["treemenu1"] //Enter id(s) of SuckerTree UL menus, separated by commasfunction buildsubmenus_horizontal(){for (var i=0; i<menuids.length; i++){var ultags=document.getElementById(menuids).getElementsByTagName("ul")for (var t=0; t<ultags.length; t++){if (ultags.parentNode.parentNode.id==menuids){ //if this is a first level submenuultags.style.top=ultags.parentNode.offsetHeight+"px" //dynamically position first level submenus to be height of main menu itemultags.parentNode.getElementsByTagName("a")[0].className="mainfoldericon"}else{ //else if this is a sub level menu (ul)ultags.style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated itultags.parentNode.getElementsByTagName("a")[0].className="subfoldericon"}ultags.parentNode.onmouseover=function(){this.getElementsByTagName("ul")[0].style.visibility="visible"}ultags.parentNode.onmouseout=function(){this.getElementsByTagName("ul")[0].style.visibility="hidden"}}}}if (window.addEventListener)window.addEventListener("load", buildsubmenus_horizontal, false)else if (window.attachEvent)window.attachEvent("onload", buildsubmenus_horizontal)</script></span></div><div class="suckertreemenu"><ul id="treemenu1"><li><a style="BORDER-LEFT: black 1px solid" href="#">Item 1</a> </li><li><a href="#">Item 2</a> </li><li><a href="#">Folder 1</a><ul><li><a href="#">Sub Item 1.1</a> </li><li><a href="#">Sub Item 1.2</a> </li><li><a href="#">Sub Item 1.3</a> </li><li><a href="#">Sub Item 1.4</a> </li></ul></li><li><a href="#">Item 3</a> </li><li><a href="#">Folder 2</a><ul><li><a href="#">Sub Item 2.1</a> </li><li><a href="#">Folder 2.1</a><ul><li><a href="#">Sub Item 2.1.1</a> </li><li><a href="#">Sub Item 2.1.2</a> </li><li><a href="#">Sub Item 2.1.3</a> </li><li><a href="#">Sub Item 2.1.4</a> </li></ul></li></ul></li><li><a href="#">Item 4</a> </li></ul><br style="CLEAR: left" /></div><p class="code_textarea" id="iepara">Rest of content here</p></div></span></div>
2、本代码适合IE浏览器,代码如下:
<select name="select1" size="1"onChange="javascript:window.open(this.options[this.selectedIndex].value)"style=" COLOR: rgb(0,0,128); FONT-SIZE: 10pt"><option value="链接一">链接标题一</option><option value="链接二">链接标题二</option><option value="链接三">链接标题三</option><option value="更多链接">更多的链接标题</option></select>
弹出窗口代码
<!--CTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt--><style type="text/css">html,body{font-size:12px;margin:0px;height:100%;}.mesWindow{border:#666 1px solid;background:#fff;}.mesWindowTop{border-bottom:#eee 1px solid;margin-left:4px;padding:3px;font-weight:bold;text-align:left;font-size:12px;}.mesWindowContent{margin:4px;font-size:12px;}.mesWindow .close{height:15px;28px;border:none;cursor:pointer;text-decoration:underline;background:#fff}</style><script>var isIe=(document.all)?true:false;//设置select的可见状态function setSelectState(state){var objl=document.getElementsByTagName('select');for(var i=0;i<objl.length;i++){objl.style.visibility=state;}}function mousePosition(ev){if(ev.pageX || ev.pageY){return {x:ev.pageX, y:ev.pageY};}return {x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,y:ev.clientY + document.body.scrollTop - document.body.clientTop};}//弹出方法function showMessageBox(wTitle,content,pos,wWidth){closeWindow();var bWidth=parseInt(document.documentElement.scrollWidth);var bHeight=parseInt(document.documentElement.scrollHeight);if(isIe){setSelectState('hidden');}var back=document.createElement("div");back.id="back";var styleStr="top:0px;left:0px;position:absolute;background:#666;"+bWidth+"px;height:"+bHeight+"px;";styleStr+=(isIe)?"filter:alpha(opacity=0);":"opacity:0;";back.style.cssText=styleStr;document.body.appendChild(back);showBackground(back,50);var mesW=document.createElement("div");mesW.id="mesWindow";mesW.className="mesWindow";mesW.innerHTML="<div class='mesWindowTop'><table width='100%' height='100%'><tr><td>"+wTitle+"</td><td style='1px;'><input type='button' onclick='closeWindow();' title='关闭窗口' class='close' value='关闭' /></td></tr></table></div><div class='mesWindowContent' id='mesWindowContent'>"+content+"</div><div class='mesWindowBottom'></div>";styleStr="left:"+(((pos.x-wWidth)>0)?(pos.x-wWidth):pos.x)+"px;top:"+(pos.y)+"px;position:absolute;"+wWidth+"px;";mesW.style.cssText=styleStr;document.body.appendChild(mesW);}//让背景渐渐变暗function showBackground(obj,endInt){if(isIe){obj.filters.alpha.opacity+=1;if(obj.filters.alpha.opacity<endInt){setTimeout(function(){showBackground(obj,endInt)},5);}}else{var al=parseFloat(obj.style.opacity);al+=0.01;obj.style.opacity=al;if(al<(endInt/100)){setTimeout(function(){showBackground(obj,endInt)},5);}}}//关闭窗口function closeWindow(){if(document.getElementById('back')!=null){document.getElementById('back').parentNode.removeChild(document.getElementById('back'));}if(document.getElementById('mesWindow')!=null){document.getElementById('mesWindow').parentNode.removeChild(document.getElementById('mesWindow'));}if(isIe){setSelectState('');}}//测试弹出function testMessageBox(ev){var objPos = mousePosition(ev);messContent="<div style='padding:20px 0 20px 0;text-align:center'>消息正文</div>";showMessageBox('窗口标题',messContent,objPos,350);}</script><div style="PADDING-RIGHT: 20px; PADDING-LEFT: 20px; PADDING-BOTTOM: 20px; PADDING-TOP: 20px"><div style="TEXT-ALIGN: left"><a href="#none">弹出窗口</a></div><div style="PADDING-LEFT: 20px; PADDING-TOP: 10px; TEXT-ALIGN: left"><select id="Select1" name="Select1"><option selected="selected">下拉</option></select>弹出窗口时会将其隐藏,关闭时会让其显示,目的是在IE中防止弹出的DIV挡不住下拉框</div><div style="TEXT-ALIGN: center"><a href="#none">弹出窗口</a></div><div style="TEXT-ALIGN: right"><a href="#none">弹出窗口</a></div></div><div style="PADDING-RIGHT: 20px; PADDING-LEFT: 20px; PADDING-BOTTOM: 20px; PADDING-TOP: 20px"></div><div style="PADDING-RIGHT: 20px; PADDING-LEFT: 20px; PADDING-BOTTOM: 20px; PADDING-TOP: 20px"></div>
qq好友上线广告代码
<!-- 代码开始 请将下面的代码放到body结束标签之前--><DIV id=eMengstyle="BORDER-RIGHT: #455690 1px solid; BORDER-TOP: #a6b4cf 1px solid; Z-INDEX: 99999; LEFT: 64px; VISIBILITY: hidden; BORDER-LEFT: #a6b4cf 1px solid; WIDTH: 168px; BORDER-BOTTOM: #455690 1px solid; POSITION: absolute; TOP: 374px; HEIGHT: 115px; <TABLE style="BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid"cellSpacing=0 cellPadding=0 width="100%" bgColor=#cfdef4 border=0><TBODY><TR><TDstyle="FONT-SIZE: 12px; BACKGROUND-IMAGE: none; COLOR: #0f2c8c"width=30 height=24> </TD><TDstyle="PADDING-LEFT: 4px; FONT-WEIGHT: normal; FONT-SIZE: 12px; BACKGROUND-IMAGE: none; COLOR: #1f336b; PADDING-TOP: 4px"vAlign=center width="100%"><span class="style13">本站提示</span></TD><TD vAlign=center align=right width=19 2px? padding-top: 2px;padding-right:><SPAN title=关闭style="FONT-WEIGHT: bold; FONT-SIZE: 12px; CURSOR: hand; COLOR: red; MARGIN-RIGHT: 4px"onclick=closeDiv()>×</SPAN></TD></TR><TR><TDstyle="PADDING-RIGHT: 1px; BACKGROUND-IMAGE: none; PADDING-BOTTOM: 1px"colSpan=3 height=90><DIVstyle="BORDER-RIGHT: #b9c9ef 1px solid; PADDING-RIGHT: 13px; BORDER-TOP: #728eb8 1px solid; PADDING-LEFT: 13px; FONT-SIZE: 12px; PADDING-BOTTOM: 13px; BORDER-LEFT: #728eb8 1px solid; WIDTH: 100%; COLOR: #1f336b; PADDING-TOP: 18px; BORDER-BOTTOM: #b9c9ef 1px solid; HEIGHT: 100%"><div align="left"> <span style="text-decoration: none"><FONTcolor=#FF0000>仿造qq好友上线<br><center> </center></FONT></span></div></DIV></td></tr></table><SCRIPT language=JavaScript>window.onload = getMsg;window.onresize = resizeDiv;window.onerror = function(){}var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;function getMsg(){try{divTop = parseInt(document.getElementById("eMeng").style.top,10)divLeft = parseInt(document.getElementById("eMeng").style.left,10)divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)docWidth = document.body.clientWidth;docHeight = document.body.clientHeight;document.getElementById("eMeng").style.top = parseInt(document.body.scrollTop,10) + docHeight + 10;// divHeightdocument.getElementById("eMeng").style.left = parseInt(document.body.scrollLeft,10) + docWidth - divWidthdocument.getElementById("eMeng").style.visibility="visible"objTimer = window.setInterval("moveDiv()",10)}catch(e){}}function resizeDiv(){try{divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)docWidth = document.body.clientWidth;docHeight = document.body.clientHeight;document.getElementById("eMeng").style.top = docHeight - divHeight + parseInt(document.body.scrollTop,10)document.getElementById("eMeng").style.left = docWidth - divWidth + parseInt(document.body.scrollLeft,10)}catch(e){}}function moveDiv(){try{if(parseInt(document.getElementById("eMeng").style.top,10) <= (docHeight - divHeight + parseInt(document.body.scrollTop,10))){window.clearInterval(objTimer)objTimer = window.setInterval("resizeDiv()",1)}divTop = parseInt(document.getElementById("eMeng").style.top,10)document.getElementById("eMeng").style.top = divTop - 1}catch(e){}}function closeDiv(){document.getElementById('eMeng').style.visibility='hidden';if(objTimer) window.clearInterval(objTimer)}</SCRIPT><!-- 代码复制结束 -->
网页两侧广告代码
左栏固定广告
<DIV id=searchspe style='Z-INDEX: 100; left: 1px; POSITION: absolute; TOP: 50px;'><TABLE cellSpacing=0 cellPadding=0 width=360 style='border-left:1px solid #333333;border-top:1px solid #333333;border-right:1px solid #333333;font-size:12px;color:#ffffff'><TR bgcolor=#2E6287><TD height=20> 推荐↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>关 闭</TD></TR></TABLE>广告内容</DIV>
右栏固定广告
<DIV id=searchspe style='Z-INDEX: 100; right: 1px; POSITION: absolute; TOP: 50px;'><TABLE cellSpacing=0 cellPadding=0 width=360 style='border-left:1px solid #333333;border-top:1px solid #333333;border-right:1px solid #333333;font-size:12px;color:#ffffff'><TR bgcolor=#2E6287><TD height=20> 推荐↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>关 闭</TD></TR></TABLE>广告内容</DIV>
漂浮广告代码
<div id="img" style="position:absolute;; 200; height: 151">广告内容</div><script LANGUAGE="JavaScript">var xPos = 20;var yPos = 10;img.style.left= xPos;img.style.top = yPos;var step = 1;var delay = 30;var width,height,Hoffset,Woffset;var y = 1;var x = 1;var interval;img.visibility = "visible";function changePos(){width = document.body.clientWidth;height = document.body.clientHeight;Hoffset = img.offsetHeight;Woffset = img.offsetWidth;if (y){yPos = yPos + step;}else{yPos = yPos - step;}if (yPos < 0){y = 1;yPos = 0;}if (yPos >= (height - Hoffset)){y = 0;yPos = (height - Hoffset);}if (x){xPos = xPos + step;}else{xPos = xPos - step;}if (xPos < 0){x = 1;xPos = 0;}if (xPos >= (width - Woffset)){x = 0;xPos = (width - Woffset);}img.style.left = xPos + document.body.scrollLeft;img.style.top = yPos + document.body.scrollTop;}function start(){interval = setInterval('changePos()', delay);}function pause_resume(){clearInterval(interval);}start();</script>
固定对联
<DIV id=searchspe style='Z-INDEX: 100; right: 5px; POSITION: absolute; TOP: 50px;'><TABLE cellSpacing=0 cellPadding=0 width=150 style='font-size:12px;color:#ffffff'><TR bgcolor=#C54A00><TD height=20> 推荐↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>关 闭</TD></TR></TABLE>广告内容</DIV><DIV id=searchspe2 style='Z-INDEX: 100; left: 5px; POSITION: absolute; TOP: 50px;'><TABLE cellSpacing=0 cellPadding=0 width=150 style='font-size:12px;color:#ffffff'><TR bgcolor=#12BDFF><TD height=20> 推荐↓</TD><TD style='CURSOR: hand' onclick=searchspe2.style.visibility='hidden' width=30>关 闭</TD></TR></TABLE>广告内容</DIV>
随动对联-1
<script language=javascript>function close163news(){searchspe.style.visibility='hidden';searchspe2.style.visibility='hidden';} var specialcode="<DIV id=searchspe style='Z-INDEX: 100; right: 1px; POSITION: absolute; TOP: 30px;'><TABLE cellSpacing=0 cellPadding=0 width=150 style='font-size:12px;color:#ffffff'><TR bgcolor=#C54A00><TD height=20> 推荐↓</TD><TD style='CURSOR: hand' onclick='close163news()' width=30>关 闭</TD></TR></TABLE>广告内容</DIV>";document.write(specialcode);lastScrollX=0;function heartBeat0(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollX);if(percent>0)percent=Math.ceil(percent);else percent=Math.floor(percent);document.all.searchspe.style.pixelTop+=percent;lastScrollX=lastScrollX+percent;}window.setInterval("heartBeat0()",1);var specialcode2="<DIV id=searchspe2 style='Z-INDEX: 100; left: 1px; POSITION: absolute; TOP: 30px;'><TABLE cellSpacing=0 cellPadding=0 width=150 style='font-size:12px;color:#ffffff'><TR bgcolor=#12BDFF><TD height=20> 推荐↓</TD><TD style='CURSOR: hand' onclick='close163news()' width=30>关 闭</TD></TR></TABLE>广告内容</DIV>";document.write(specialcode2);lastScrollY=0;function heartBeat1(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollY);if(percent>0)percent=Math.ceil(percent);else percent=Math.floor(percent);document.all.searchspe2.style.pixelTop+=percent;lastScrollY=lastScrollY+percent;}window.setInterval("heartBeat1()",1);</script>
随动对联-2
<script type="text/javascript">//<![CDATA[var tips; var theTop = 250; var old = theTop;function initFloatTips() {tips = document.getElementById('yy'); <!-- 本段的yy是名称 -->moveTips();};function moveTips() {var tt=50;if (window.innerHeight) {pos = window.pageYOffset}else if (document.documentElement && document.documentElement.scrollTop) {pos = document.documentElement.scrollTop}else if (document.body) {pos = document.body.scrollTop;}pos=pos-tips.offsetTop+theTop;pos=tips.offsetTop+pos/10;if (pos < theTop) pos = theTop;if (pos != old) {tips.style.top = pos+"px";tt=10;}old = pos;setTimeout(moveTips,tt);}//!]]></script><!--脚本结束--><!--定义yy和left的数值--><style type="text/css">#yy{position:absolute;padding:3px;top:250px;z-index:99999;100%;} a#left {float:left;80px;height:200px;border:1px solid red}</style><!--下面是正文,放在最后面。--><body ><div id="yy"> <!--名称yy--><div id="left"><!--名称left--><div id="Layer1" style="position:absolute; 61px; height:60px; z-index:100000; top: 21px;"><img src="/IMAGES/qleft3.jpg" width="60" height="60"><!--图片地址--></div><table border="0" align="right"><tr><td ><img src="/IMAGES/qleft3.jpg" width="60" height="60"><!--图片地址--></td></tr></table></div></div></br /></br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></br /> </br /></body></html>
----------
博客中常用的代码
一、美化文字的代码:
7.在字前加圆点:
<li>文字内容</li>
12.消除连接的下划线:
<a href="相关地址" style="text-decoration:none">文字内容</a>
13.滚动文字效果:
// marquee有四个方向参数,如图1
<marquee direction="up">文字内容</marquee>
图1
二、在博客中嵌入其他元素
1.在博客中贴图:
// width是图片的宽度,height是高度
<img src="图片地址"; width="120"; height="90"; alt="鼠标移动到图片上显示的字";>
2.在博客中贴Flash:
// width,height可以是指定的高度,也可以不设置,可以是100%
<embed src="flash地址" width="100%" height="100%">
3.在博客中贴音乐:loop="true" 循环播放(播放一次,true改为false)autostart="true" 自动开始播放(用户点击播放,true改为false)
<embed src="音乐地址" width="宽度" height="高度" autostart=false>
<EMBED ="音乐地址" width=200 height=40 type="audio/x-pn-realaudio-plugin" loop="true" autostart="true" controls="ControlPanel,StatusBar">
4.博客中贴食品:
<img dynsrc="文件地址" width="宽度" height="高度" start=mouseover>
5.固定日志背景不随滚动条滚动:
<body background="背景图片地址" body bgproperties=fixed>
超链接文字特效代码:
把下列代码之一添加到面板(文章)中,该面板(文章)中的链接即可显示相应的特效:
让链接变色代码:
<STYLE TYPE="text/css">
A { text-decoration: NONE; color: #51bfe0}
A:hover { color: #3399FF }
</STYLE>
增加链接的力度(字体变大)代码:
<STYLE TYPE="text/css">
A { text-decoration: NONE; color: #51bfe0}
A:hover {font-weight: bold }
</STYLE>
触到链接是出现虚线代码:
<STYLE TYPE="text/css">
A { text-decoration: NONE; color: #51bfe0}
A:hover {border-bottom:1px dashed #51bfe0 }
</STYLE>
会移动的链接代码:
<STYLE TYPE="text/css">
A { text-decoration: NONE; color: #51bfe0}
A:hover { ; left:1px; top:1px; }
</STYLE>
给链接添加背景色代码:
<STYLE TYPE="text/css">
A { text-decoration: NONE; color: #51bfe0}
A:hover { }
</STYLE>
图片(挂件)随滚动条移动代码:
<DIV style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; ; RIGHT: +eval(document.body.clientWidth)-110); FILTER: progid:DXImageTransform.Microsoftpadding:8px; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; ; ; TOP: +eval(document.body.clientHeight)-400); TEXT-ALIGN: center"><IMG src="图片地址" border=0></DIV>
代码说明:
-100表示图片距离屏幕左侧的距离,负数值越大距离左侧越远;
-400表示图片距离屏幕下方的距离,负数值越大距离下方越远(越靠上);
效果预览:
如首页左侧图片。
图片上飘动的文字特效代码:
<TABLE borderColor=#cd5c5c height=350 width=450 align=center border=3>
<TBODY>
<TR>
<TD background=图片地址>
<MARQUEE scrollAmount=3 direction=down behavior=alternate height=350>
<MARQUEE scrollAmount=3 behavior=alternate width=500>
<P align=center><FONT color=red size=6><B>图片上的文字</B></FONT></P></MARQUEE></MARQUEE></TD></TR></TBODY></TABLE>
代码说明:
width为浮动文字框架的宽度;
height为浮动文字框架的高度;
color=red表示文字颜色为红色(查询颜色代码)
效果预览:
演示文字
以图片为背景发表文章代码:
<table width="450" border="0">
<tr>
<td height="500" background="图片地址"></td>
</tr>
</table> 效果预览:
这里是演示文字。
这些文字可以直接在图片上输入。
为了美观,建议从其他文本编辑器中直接将文章复制到图片上。
------------
上下翻转代码:
<img src="图片地址" style="filter:FlipV">
左右镜像代码:
<img src="图片地址" style="filter:FlipH">