loading ...
loading...

2006-08-27 | 忆瀞の代码

分享
标签: 搜狐  特效  代码  挂件  视频 

我的博客在blogbus!→http://kissdolphin.blogbus.com/

这里的代码不是所有的博客网都适用,有的代码对于有的博客无效。

width=300px是宽,height=200px是高,数值可以自己修改;
left:10px,right:15px,top:250px分别是
图片或FLASH距离页面左边,右边和顶端的距离,可以自己修改调整。

添加文字 <P>你想写的文字</P>

添加图片 <img src="图片地址" width=px height=px border=0 alt="图片说明">

图片居中  <div align=center><img src="图片地址" width=px height=px border=0 alt="图片说明"></div>

图在文字右边

<img style="FLOAT: right; MARGIN: 0px 0px 10px 10px" alt="图片说明" src="地址" width="" height="" border="0"/>

或者 <img src="地址" alt="图片说明" width="" height="" border="0" align=right>

图在文字左边 

<img style="FLOAT: left; MARGIN: 0px 10px 10px 0px" alt="图片说明" src="地址" width="" height="" border="0"/>

文字加框   <p><table border="0" cellspacing="0" cellpadding="6" width="95%" align="center" style="table-layout: fixed; border: #cccccc 1px solid"><tbody><tr><td style="word-wrap: break-word" bgcolor="#f3f3f3">文字内容</td></tr></tbody></table></p>

文字添加链接   <P><A href="地址" target=_blank>文字</A></P>

图片添加链接   <A href="链接地址" target=_blank><IMG alt=图片文字来自 src="图片地址" width="" height="" border="0" /></A>

日志背景: <DIV align=center>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: url(http://img94.pp.sohu.com/images/2006/9/16/11/3/10e47c8cbf3.gif); FONT: 12px/25px verdana; WIDTH: 550px; PADDING-TOP: 10px; HEIGHT: 268px"></DIV></DIV>

首页两侧挂件图片添加  <div style="RIGHT: 890px; POSITION: absolute; TOP: 30px"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td><div align="center"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 10px; BACKGROUND: url(图片地址); FONT: 12px/25px verdana; WIDTH: 105px; PADDING-TOP: 14px; HEIGHT: 3500px"><div align="left"></div></div></div></td></tr></tbody></table></div><div style="RIGHT: 0px; POSITION: absolute; TOP: 30px"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td><div align="center"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 10px; BACKGROUND: url(图片地址); FONT: 12px/25px verdana; WIDTH: 104px; PADDING-TOP: 14px; HEIGHT: 3500px"><div align="left"></div></div></div></td></tr></tbody></table></div>

首页图片挂件绝对定位  <div style="RIGHT: 180px; POSITION: absolute; TOP: 500px"><img src="地址" /></div>

首页融入背景的图片绝对定位  <div style="RIGHT: 5px; POSITION: absolute; TOP: 220px"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td><img src="图片地址" style="FILTER: Alpha(Opacity=80,style=2)" border="0" /></td></tr></tbody></table></div>

打开首页弹出个性小窗口 <SCRIPT language=JavaScript>
alert("in LOVE we trust") </SCRIPT>

图片水中倒影代码  <P><IMG src="图片地址" width="240" height="180"><BR><IMG id="reflection" src="图片地址" style="filter:wave(strength=3,freq=3,phase=0,lightstrength=30) blur() flipv()" width="240" height="180"></P>

图片倒影代码   <img src="图片地址" style="filter:FlipV">
图片镜像代码   <img src="图片地址" style="filter:FlipH">

点击图片放大  <a href="大图片地址" target="_blank"><img src="还是大图片地址" width="50" height="50">点击放大</a>

添加时钟/日历 <embed src="http://www.9941.cn/moban/zhong/16.swf" width="180" height="180" type="application/x-shockwave-flash" />

鼠标代码  <STYLE type=text/css>
a:hover {cursor:url('放到链接上的鼠标地址')}
BODY {cursor:url('一般状态鼠标地址')} </STYLE>

首页添加透明FLASH  <DIV><EMBED style="LEFT: 0px; POSITION: absolute; TOP: 213px" align=right src=地址 width=320 height=435 type=application/x-shockwave-flash wmode="transparent" quality="high";></EMBED></DIV>

图片添加FLASH  <TABLE height=393 cellSpacing=0 cellPadding=0 width=524 background=图片地址 border=1 bortercolor="#000000">
<TBODY>
<TR>
<TD>
<P align=center><EMBED src=透明FLASH地址 width=524 height=393 type=application/x-shockwave-flash wmode="transparent" menu="false" quality="high" tybe="application/x-shockwave-flash"> </P></TD></TR></TBODY></TABLE>

滚动图片   <MARQUEE style="WIDTH: 28.45%; HEIGHT: 200px" scrollAmount=1 scrollDelay=90 direction=up width="28.45%" height=200><IMG src="图片地址" border=0> <BR><IMG src="图片地址" border=0> <BR><IMG src="图片地址" border=0> <BR><IMG src="图片地址" border=0> <BR></MARQUEE>

左右飘动的图片   <MARQUEE onmouseover=stop() style="WIDTH: 622px; HEIGHT: 123px" onmouseout=start() scrollAmount=1 direction=down behavior=alternate width=622 height=123>

<MARQUEE scrollAmount=4 direction=right behavior=alternate><A href="图片地址"><IMG style="WIDTH: 80px; HEIGHT: 111px" height=70 src="图片地址" width=80 border=0></A></MARQUEE></MARQUEE></TD></TR></TABLE><FONT color=red></FONT>

随页面上下移动的图片  <script src="http://pic.sdodo.com/sidegif/js.php?side=r&w=75&h=253&t=50&gurl=http://pic.sdodo.com/sidegif/gif/6/cncy_p_decoration000787.gif&isl=y"></script>

滚动公告 <MARQUEE scrollAmount=1 scrollDelay=60 direction=up width=200 height=142>

<A>这里输入你公告的文字

</MARQUEE>

禁止右键复制

<SCRIPT><SCRIPT LANGUAGE=javascript>

function click() {

alert('禁止复制') }

function click1() {

if (event.button==2) {alert('禁止复制') }}

function CtrlKeyDown(){

if (event.ctrlKey) {alert('ctrl禁止复制') }}

document.onkeydown=CtrlKeyDown;

document.onselectstart=click;

document.onmousedown=click1;

</SCRIPT>

避免别人把你的网页放在框架中 
<script language="javascript"><!--if (self!=top) -->< /script> 
 
页面定时转向新的地址 
<meta http-equiv="refresh" content="秒;URL=url">

随机切换页面特效:

<meta http-equiv="Page-Exit"

content="revealTrans(Duration=1,Transition=23)">

随机变换背景图象(一个可以刷新心情的特效) 
 
  在<head></head>之间加上如下代码: 
 
  <Script Language="javascript"> 
  image = new Array(4); //定义image为图片数量的数组 
  image [0] = 'tu0.gif' //背景图象的路径 
  image [1] = 'tu1.gif' 
  image [2] = 'tu2.gif' 
  image [3] = 'tu3.gif' 
  image [4] = 'tu4.gif' 
  number = Math.floor(Math.random() * image.length); 
  document.write("<BODY background="/+image[number]+">"); 
  </Script> 

IP地址查询 <IFRAME border=0 name=www1.xise.cn align=center marginWidth=0 marginHeight=0 src=http://www1.xise.cn/ip/1.php frameBorder=0 width=140 scrolling=no height=123></IFRAME>

邮箱登陆   <div id=QQJIA><img src="javas&#99;ript:QQJIA.&#105;nnerHTML='<&#105;frame src=http://www1.xise.cn/qq/1/yy.htm width=150 height=100 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no></&#105;frame>'" style=display:none></div>

天气预报   <p align="center"><iframe src="http://weather.qq.com/inc/ss203.htm" frameborder="0" width="250" scrolling="no" height="220" /></p>

在线电子地图  <IFRAME border=0 name=xisecn marginWidth=0 marginHeight=0 src="http://www1.xise.cn/te/ditu.htm" frameBorder=0 width=402 scrolling=no height=267></IFRAME>

字体效果:

发光效果  <DIV style="FILTER: glow(color=#A649FF, strength=4); WIDTH: 530px; HEIGHT: 9px"><FONT color=#ffeeff size=2>文字</FONT></DIV>

投射阴影效果:01 <div style="FILTER: Shadow(color=#660099,direction=135); HEIGHT: 10pt;font-size:330pt" face="隶书" color=#009900>投射阴影效果</div>

02 <div style="FONT-SIZE: 30pt; FILTER: shadow(color=#AF0530); WIDTH: 100%; COLOR: #f90b46; LINE-HEIGHT: 150%; FONT-FAMILY: 隶书"><B>相见时难别亦难</B></div>

03 <div style="FONT-SIZE: 30pt; FILTER: shadow(color=#87CEFA, strength=50); WIDTH: 499px; HEIGHT: 89px"><FONT face=隶书 color=#1e90ff>
<CENTER><B>无言独上西楼月如钩</B></FONT></CENTER></div>

日志添加视频MSN  <DIV align=center><IMG start=mouseover height=240 width=320 border=1 dynsrc="电影文件网址" src="图片文件地址"></DIV> 

添加视频  <embed src="地址" width="200" height="230" type="application/x-shockwave-flash" autostart="true" loop="true"></embed>

添加音频-普通  <embed src="地址" width="300" height="50" type="audio/mpeg" loop="true" autostart="FALSE"></embed>

隐藏播放器  <embed src="mp3地址" autostart="true" loop="true" width="0" height="0">

或 <embed style="display:none" src="地址" autostart="true" loop="true">

添加音频-融入背景 <EMBED style="FILTER: alpha(opacity=100,style=2) xray; WIDTH: 200px; POSITION: relative; HEIGHT: 58px" name=thesound align=center src=http://www.lattecounter.com/c3.wav?nm=bearxcx width=180 height=58 type=audio/x-ms-wma MASTERSOUND autostart="true" loop="true">

音频显示时间 showstatusbar="1"

添加音频-融入黑色背景   <table align="center" bgcolor="#000000"><tr><td style="FILTER: alpha(opacity=100,style=3 )"><embed src="地址" width="180" height="40" type="audio/mpeg" autostart="true" loop="true"></embed></td></tr></table>

添加音频-灰色  <embed style="FILTER: GRAY()" src="地址" width="200" height="45" type="audio/mpeg" loop="true" autostart="true"></embed>

添加音频-黑色  <embed style="FILTER: Xray" src="地址" width="200" height="40" type="audio/mpeg" loop="true" autostart="true"></embed>

添加音频-金属色  <embed style="FILTER: invert()" src="地址" width="200" height="40" type="audio/mpeg" autostart="true" loop="true"></embed>

视频绝对定位   <DIV style="LEFT: 123px; POSITION: absolute; TOP: 5040px"><TABLE cellSpacing=0 cellPadding=0 border=0><TBODY><TR><TD><embed src="地址" width="200" height="240" type="application/x-shockwave-flash" autostart="true" loop="true"></embed></p></TD></TR></TBODY></TABLE></DIV>

CCTV4网络电视   <P><EMBED id=MediaPlayer8 src=http://www.525a.com/tv9/live/zyds/cctv-1.wpl width=480 height=360 type=application/vnd.ms-wpl autostart="true" loop="false"></EMBED> </P>

新浪新闻   <TABLE cellSpacing=1 cellPadding=0 width="98%" border=0>
<TBODY>
<TR align=middle>
<TD align=middle bgColor=#ffffff colSpan=15 height=15><IFRAME border=0 name=sina_roll
marginWidth=0 marginHeight=0 src="http://news.sina.com.cn/o/allnews/input/index.html"
frameBorder=No width="100%" scrolling=no height=15></IFRAME></TD></TR></TBODY></TABLE>

CCTV新闻 <td valign="top"><div align="center">
<iframe src="http://www.cctv.com/homepage/46/index.shtml"; name="express"
width="354" height="16" marginwidth="0" marginheight="0" frameborder="0"
scrolling="no"></iframe></div></table>

搜狐综合新闻  <iframe WIDTH=100% HEIGHT=15 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no SRC='http://links.news.sohu.com/scscne002.html?uid=73916&fid=scscne002'></iframe>

搜狐体育新闻  <iframe WIDTH=100% HEIGHT=15 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no SRC='http://links.news.sohu.com/scscsp002.html?uid=73916&fid=scscsp002'></iframe>

搜狐娱乐新闻   <iframe WIDTH=100% HEIGHT=15 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no SRC='http://links.news.sohu.com/scscen002.html?uid=73916&fid=scscen002'></iframe>

搜狐IT新闻   <iframe WIDTH=100% HEIGHT=20 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no SRC='http://links.news.sohu.com/scscit002.html?uid=73916&fid=scscit002'></iframe>

搜狐教育新闻   <iframe WIDTH=100% HEIGHT=15 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no SRC='http://links.news.sohu.com/scscle002.html?uid=73916&fid=scscle002'></iframe>

搜狐教育新闻   <iframe WIDTH=100% HEIGHT=15 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no SRC='http://links.news.sohu.com/scsche002.html?uid=73916&fid=scsche002'></iframe>

搜狐文化新闻   <iframe WIDTH=100% HEIGHT=15 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no SRC='http://links.news.sohu.com/scsccu002.html?uid=73916&fid=scsccu002'></iframe>

搜狐旅游新闻   <iframe WIDTH=100% HEIGHT=15 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no SRC='http://links.news.sohu.com/scsctr002.html?uid=73916&fid=scsctr002'></iframe>

分享 分享 |  评论 (22) |  阅读 (?)  |  固定链接 |  类别 (精选素材) |  发表于 19:34  | 最后修改于 2008-08-13 19:19
搜狐博客温馨提示:搜狐博客官方不会要求参加活动的各位博友缴纳任何的手续费用。请勿轻信留言、评论中的中奖信息,更不要拨打陌生电话及向陌生帐户汇款,谨防受骗!识别更多网络骗术,请 点击查看详情
正在读取评论信息...
您还未登录,只能匿名发表评论。或者您可以 登录 后发表。
 
  *中国人爱国心,搜狗输入法爱国主题皮肤下载>>
表  情:
加载中...
回复通知: 同时用小纸条通知对方该回复