广告切换 特效代码

Post by 张美工, 2009-4-16, Views:

这两天用特效代码,就整理了一些,都是比较经典的,放上去跟大家分享分享,这些代码我已经处理过了,直接复制来用就可以,根据你们自己的图片大小改一下尺寸即可

document.write
             ('
      <object ID="focus_flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"                  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">'
    );

解释一下:

pics=图片的地址 改为你的图片地址

links=图片的超链接的地址

texts=图片切换下方的名称

bgcolor="#cccccc" 为背景颜色,可参考颜色代码自行设置

width=300 height=170 此为背景的宽与高,可以自行设置

borderwidth=300 borderheight=150 此为图片切换的宽与高

textheight=20 此为标题区域高度

 

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<!--焦点图开始-->
                   <script type="text/javascript">
<!--

var focus_width=340
var focus_height=230
var text_height=20
var swf_height = focus_height+text_height

var pics='http://img1.qq.com/auto/pics/1360/1360768.jpg|http://img1.qq.com/auto/pics/1360/1360811.jpg|http://img1.qq.com/auto/pics/1360/1360769.jpg|http://img1.qq.com/auto/pics/1360/1360770.jpg'
var links='http://auto.qq.com/a/20060824/000090.htm|http://auto.qq.com/a/20060825/000001.htm|http://auto.qq.com/zt/2006/family2/topic_html/fml01.htm|http://auto.qq.com/zt/2006/family2/topic_html/shiclist.htm'
var texts='福美来2代改变了哪里?|福美来换标车首现京城|参观福美来工厂实拍|福美来2代试车现场'

 

document.write('<object ID="focus_flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="http://auto.qq.com/flash/playswf.swf"><param name="quality" value="high"><param name="bgcolor" value="#FFFFFF">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed ID="focus_flash" src="http://auto.qq.com/flash/playswf.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#C5C5C5" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');   document.write('</object>');

//-->
</script>
<body>

                   <!--焦点图结束-->
 


</body>
</html>                 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
<HEAD>
<TITLE>又一款FLASH图片切换效果代码 www.qpsh.com</TITLE>
<center>
<script>
if(typeof sas=="undefined")var sas=new Object();
if(typeof sas.ued=="undefined")sas.ued=new Object();
if(typeof sas.ued.util=="undefined")sas.ued.util=new Object();
if(typeof sas.ued.FlashObjectUtil=="undefined")sas.ued.FlashObjectUtil=new Object();
sas.ued.FlashObject=function(swf,id,w,h,ver,c,useExpressInstall,quality,xiRedirectUrl,redirectUrl,detectKey)
{
if(!document.createElement||!document.getElementById)return;this.DETECT_KEY=detectKey?detectKey:'detectflash';
this.skipDetect=sas.ued.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();this.variables=new Object();
this.attributes=new Array();this.useExpressInstall=useExpressInstall;
if(swf)this.setAttribute('swf',swf);
if(id)this.setAttribute('id',id);
//by www.qpsh.com
if(w)this.setAttribute('width',w);
if(h)this.setAttribute('height',h);
if(ver)this.setAttribute('version',new sas.ued.PlayerVersion(ver.toString().split(".")));
this.installedVer=sas.ued.FlashObjectUtil.getPlayerVersion(this.getAttribute('version'),useExpressInstall);
if(c)this.addParam('bgcolor',c);
var q=quality?quality:'high';
this.addParam('quality',q);
var xir=(xiRedirectUrl)?xiRedirectUrl:window.location;this.setAttribute('xiRedirectUrl',xir);
this.setAttribute('redirectUrl','');
if(redirectUrl)this.setAttribute('redirectUrl',redirectUrl)};
sas.ued.FlashObject.prototype={setAttribute:function(name,value){this.attributes[name]=value},getAttribute:function(name){return this.attributes[name]},addParam:function(name,value){this.params[name]=value},getParams:function(){return this.params},addVariable:function(name,value){this.variables[name]=value},getVariable:function(name){return this.variables[name]},getVariables:function(){return this.variables},createParamTag:function(n,v){var p=document.createElement('param');p.setAttribute('name',n);p.setAttribute('value',v);return p},getVariablePairs:function(){var variablePairs=new Array();var key;var variables=this.getVariables();for(key in variables){variablePairs.push(key+"="+variables[key])}return variablePairs},getFlashHTML:function(){var flashNode="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall"))this.addVariable("MMplayerType","PlugIn");flashNode='<embed type="application/x-shockwave-flash" src="'+this.getAttribute('swf')+'" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'"';flashNode+=' id="'+this.getAttribute('id')+'" name="'+this.getAttribute('id')+'" ';var params=this.getParams();for(var key in params){flashNode+=[key]+'="'+params[key]+'" '}var pairs=this.getVariablePairs().join("&");if(pairs.length>0){flashNode+='flashvars="'+pairs+'"'}flashNode+='/>'}else{if(this.getAttribute("doExpressInstall"))this.addVariable("MMplayerType","ActiveX");flashNode='<object id="'+this.getAttribute('id')+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'">';flashNode+='<param name="movie" value="'+this.getAttribute('swf')+'" />';var params=this.getParams();for(var key in params){flashNode+='<param name="'+key+'" value="'+params[key]+'" />'}var pairs=this.getVariablePairs().join("&");if(pairs.length>0){flashNode+='<param name="flashvars" value="'+pairs+'" />'}flashNode+="</object>"}return flashNode},write:function(elementId){if(this.useExpressInstall){var expressInstallReqVer=new sas.ued.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(expressInstallReqVer)&&!this.installedVer.versionIsValid(this.getAttribute('version'))){this.setAttribute('doExpressInstall',true);this.addVariable("MMredirectURL",escape(this.getAttribute('xiRedirectUrl')));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}else{this.setAttribute('doExpressInstall',false)}if(this.skipDetect||this.getAttribute('doExpressInstall')||this.installedVer.versionIsValid(this.getAttribute('version'))){var n=(typeof elementId=='string')?document.getElementById(elementId):elementId;n.innerHTML=this.getFlashHTML()}else{if(this.getAttribute('redirectUrl')!=""){document.location.replace(this.getAttribute('redirectUrl'))}}}};sas.ued.FlashObjectUtil.getPlayerVersion=function(reqVer,xiInstall){var PlayerVersion=new sas.ued.PlayerVersion(0,0,0);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){PlayerVersion=new sas.ued.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");for(var i=3;axo!=null;i++){axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);PlayerVersion=new sas.ued.PlayerVersion([i,0,0])}}catch(e){}if(reqVer&&PlayerVersion.major>reqVer.major)return PlayerVersion;if(!reqVer||((reqVer.minor!=0||reqVer.rev!=0)&&PlayerVersion.major==reqVer.major)||PlayerVersion.major!=6||xiInstall){try{PlayerVersion=new sas.ued.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","))}catch(e){}}}return PlayerVersion};sas.ued.PlayerVersion=function(arrVersion){this.major=parseInt(arrVersion[0])||0;this.minor=parseInt(arrVersion[1])||0;this.rev=parseInt(arrVersion[2])||0};sas.ued.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major)return false;if(this.major>fv.major)return true;if(this.minor<fv.minor)return false;if(this.minor>fv.minor)return true;if(this.rev<fv.rev)return false;return true};sas.ued.util={getRequestParameter:function(param){var q=document.location.search||document.location.href.hash;if(q){var startIndex=q.indexOf(param+"=");var endIndex=(q.indexOf("&",startIndex)>-1)?q.indexOf("&",startIndex):q.length;if(q.length>1&&startIndex>-1){return q.substring(q.indexOf("=",startIndex)+1,endIndex)}}return""}};if(Array.prototype.push==null){Array.prototype.push=function(item){this[this.length]=item;return this.length}}var getQueryParamValue=sas.ued.util.getRequestParameter;var sohuFlash=sas.ued.FlashObject;
function Cookie(document,name,hours,path,domain,secure){this.$document=document;this.$name=name;this.$expiration=hours?new Date((new Date()).getTime()+hours*3600000):null;this.$path=path?path:null;this.$domain=domain?domain:null;this.$secure=secure;};Cookie.prototype.store=function (){var cookieval="";for(var prop in this){if((prop.charAt(0)=='$')||((typeof this[prop])=='function')) continue;if(cookieval!="") cookieval+='&';cookieval+=prop+':'+escape(this[prop]);}var cookie=this.$name+'='+cookieval;if(this.$expiration)cookie+='; expires='+this.$expiration.toGMTString();if(this.$path) cookie+='; path='+this.$path;if(this.$domain) cookie+='; domain='+this.$domain;if(this.$secure) cookie+='; secure';this.$document.cookie=cookie;};Cookie.prototype.load=function(){var allcookies=this.$document.cookie;if(allcookies=="") return false;var start=allcookies.indexOf(this.$name+'=');if(start==-1) return false;start+=this.$name.length+1;var end=allcookies.indexOf(';',start);if(end==-1) end=allcookies.length;var cookieval=allcookies.substring(start,end);var a=cookieval.split('&');for(var i=0; i<a.length; i++) a[i]=a[i].split(':');for(var i=0; i<a.length; i++) this[a[i][0]]=unescape(a[i][1]);return true;};Cookie.prototype.remove = function(){var cookie;cookie = this.$name + '=';if (this.$path) cookie += '; path=' + this.$path;if (this.$domain) cookie += '; domain=' + this.$domain;cookie += '; expires=Fri, 02-Jan-1970 00:00:00 GMT';this.$document.cookie = cookie;};
</script>
<BODY bgcolor="#F7F7F7">
<DIV class=focusFlash>
<DIV id=sasFlashFocus27></DIV>
<SCRIPT type=text/javascript>
//<![CDATA[
txt="<a image='http://www.qpsh.com/icon/443_209_1.jpg' info='网页特效是用程序代码在网页中实现特殊效果或者特殊功能的一种技术' url='http://www.qpsh.com' /><a image='http://www.qpsh.com/icon/443_209_2.jpg' info='它为网页活跃了气氛,增加了网站的亲和力。' url='http://www.qpsh.com' /><a image='http://www.qpsh.com/icon/443_209_3.jpg' 广告代码《经典》
info='一般在你想添加特效的地方直接粘贴特效代码即可' url='http://www.qpsh.com/' /><a image='http://www.qpsh.com/icon/443_209_4.jpg' info='在本站下载的特效代码,都有详细说明,按说明使用即可。' url='http://www.qpsh.com' />"
var sohuFlash2 = new sohuFlash("http://www.qpsh.com/icon/qpsh_com_tp2.swf", "27", 520, 205, "7");
sohuFlash2.addParam("quality", "high");
sohuFlash2.addParam("wmode", "opaque");
sohuFlash2.addVariable("txt",txt);
sohuFlash2.write("sasFlashFocus27");
//]]>
</SCRIPT>
</DIV>
</BODY>
</HTML>

<SCRIPT Language="JavaScript">

var msg="欢迎访问网页特效代码 www.qpsh.com ";
var interval = 100;
var space10="";
var seq=0;

function Scroll() {
document.tmForm.tmText.value = msg.substring(seq, msg.length) + space10 + msg.substring(0, msg.length);
seq++;seq++;
if ( seq > msg.length ) { seq = 0 };
window.setTimeout("Scroll();", interval );
}

</SCRIPT>

<BODY OnLoad="Scroll();" >

<CENTER><FORM Name=tmForm>
<INPUT Type=Text Name=tmText Size=45>
</FORM></CENTER>

网页特效网


动态导航

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
BODY {
 FONT-SIZE: 12px; MARGIN: 0px;BACKGROUND-COLOR: #131d30
}
A:link {
 COLOR: #7ea9bf; TEXT-DECORATION: none
}
A:visited {
 COLOR: #7ea9bf; TEXT-DECORATION: none
}
A:hover {
 COLOR: #ffffff; TEXT-DECORATION: underline
}
A:active {
 COLOR: #ffffff; TEXT-DECORATION: none
}
.Defautl-Navigation {
 FONT-SIZE: 12px; FLOAT: left; COLOR: #7ea9bf; LINE-HEIGHT: 23px; HEIGHT: 23px; TEXT-ALIGN: center
}
</style>
<SCRIPT language=javascript>
var f=0;
var y=0;
var div_obj
function over(obj){
 div_obj=obj
 _f=0;
 y=0;
 document.getElementById(obj).innerHTML="";
 document.getElementById(obj).style.width="0px";
 document.getElementById(obj).style.height="1px";
 document.getElementById(obj).style.display="";
 timerDIV();
}
function out(obj){
 obj.style.display="none";
}
function Tout(){
document.getElementById(div_obj).style.display="none";
}
function Tover(){
 document.getElementById(div_obj).style.display="";
}
function timerDIV(){
 if( _f >= 140){/*宽度*/
  objy();
  return ;
 }
 else{
  _f=_f+10;
  document.getElementById(div_obj).style.width=_f+"px";
  window.setTimeout(timerDIV,1);
 }
}
function objy(){
 if(y >= 150){/*高度*/
  var str="<div style=\"width:150px;height:auto;float:left;font-size:12px;margin:6px;line-height:20px\"><a href=\"http://www.qpsh.com\">新闻-1</a><br/>  <font style=\"color:#7EA9BF;font-size:11px;\">♦</font> <a href=\"http://www.qpsh.com\" style=\"font-size:11px;\">新闻-1-1</a><br/>  <font style=\"color:#7EA9BF;font-size:11px;\">♦</font> <a href=\"http://www.qpsh.com\" style=\"font-size:11px\">新闻-1-2</a><br/>  <font style=\"color:#7EA9BF;font-size:11px;\">♦</font> <a href=\"http://www.qpsh.com\" style=\"font-size:11px\">新闻-1-3</a><br/><a href=\"http://www.qpsh.com\">新闻-2</a><br /><a href=\"http://www.qpsh.com\">新闻-3</a><br/><\/div>";
  document.getElementById(div_obj).innerHTML=str
  return ;
 }
 else{
  y+=6;
  document.getElementById(div_obj).style.height=y+"px";
  window.setTimeout(objy,1);
 }
}
</SCRIPT>
<title>JS导航效果</title>
</HEAD>
<BODY>
<DIV class=Default-top>
 <DIV style="BORDER: #51789b 1px solid; width:500px;HEIGHT:23px; margin:20px auto; position:relative;">
  <DIV class=Defautl-Navigation style="WIDTH: 60px"><A href="#">首页</A></DIV>
  <DIV class=Defautl-Navigation style="WIDTH: 10px">|</DIV>
  <DIV class=Defautl-Navigation style="WIDTH: 70px; CURSOR: pointer"><A
   onMouseOver="over('two')" onmouseout=out(two) href="#">新闻 ∇</A>
  </DIV>
  <DIV class=Defautl-Navigation style="WIDTH: 10px">|</DIV>
  <DIV class=Defautl-Navigation style="WIDTH: 80px"><A href="#">
   联系我们</A></DIV>
  <DIV class=Defautl-Navigation style="WIDTH: 10px">|</DIV>
  <DIV class=Defautl-Navigation style="WIDTH: 50px"><A href="#">
   其他</A></DIV>
  <DIV id=two style="overflow:hidden;BORDER: #51789b 2px solid;DISPLAY: none; FILTER: alpha(Opacity=70); LEFT:300px; FLOAT:left; WIDTH: 1px; POSITION:absolute; TOP: 14px; left:80px; HEIGHT: 1px; BACKGROUND-COLOR: #444; -moz-opacity: 0.7"
   onmousemove=Tover() onmouseout=Tout()>No Content
  </DIV>
 </DIV>
</DIV>
</BODY>
</HTML>
网页特效网

 

   DIV+CSS 内容目录总   为了方便喜欢网站UE设计的各位朋友讨论和学习,特地将DIV+CSS全部内容的目录罗列出来                            

# Dreamweaver的超级技巧汇总(6)
# Dreamweaver的超级技巧汇总(5)
# Dreamweaver的超级技巧汇总(4)
# Dreamweaver的超级技巧汇总()
# Dreamweaver的超级技巧汇总(2)
# Dreamweaver的超级技巧汇总(1)
# 在线QQ MSN TEL交谈工具代码
# 方便使用的一些小简短input\form代码
# VSS使用手册
# JS表单判断函数代码大全 ()
# JS表单判断函数代码大全 ()
# JS表单判断函数代码大全 

 

#  I E和火狐的css兼容性问题归总

体验css+div 之 CSS hack:区分IE6,IE7,firefox

体验css+div 兼容标准XHTML的浮动层特效实现

因为编码差异 导致IE6不能正常解析CSS文件

#  商业网站响应用户需求重视与Firefox兼容


#  
frameset 的属性
frameset元素属性详解、浮动框架的制作、超链接与框架的制作

 

体验css+div 之 SEO

#  40个网页常用小代码

div+css样式几个小精华

网站用户体验--CSS常用小技巧

#  体验css+div css技巧-经典中的经典

#  体验css+div CSS样式表设计的十条技巧

体验css+div 网页切图过程中div+css命名规则

网站用户体验--根据项目需求定义 常用CSS2基本定义例子
#  体验css+div 三种使网站背景图片自动适应浏览器大小的方法

 

#  搜索

#  创建锚链接

#  如何让单行文本框input与多行文本框textarea背景透明

EditPlus转化文件格式到UTF-8
#  让长字符URL/Email自动换行

HTML特殊字符显示

 

#  体验css+div定位与table定位代码的差异
体验css+div 之 TBody是什么意思?有什么作用?<TBODY>和<BODY>有和区别?

 

体验css+div 简单的滑动门效果代码

#  体验css+div 超实用的滑动门效果代码(css和代码都包含在内)

 

彻底弄懂CSS盒子模式(DIV布局快速入门)

如何把握网页布局
实例详解CSS网页布局原理

体验CSS+DIV 基本布局

#  体验css+div 解决流体布局的问题
#  体验css+div 固定宽度布局、流体布局、弹性布局的优势对比<弹性布局>
#  
体验css+div 固定宽度布局、流体布局、弹性布局的优势对比<流体布局>
体验css+div 固定宽度布局、流体布局、弹性布局的优势对比<固定宽度布局>

 

 

 

#  体验css+div 为什么css+div 会盛行
#  体验css+div中id和class各自的用法及区别

体验css+div 规划、组织和维护样式表

体验css+div 基本列表样式

体验css+div 为样式找到目标

 

体验css+div 圆角框

体验css+div 层叠和特殊性
#  css之自动换行

#  CSS控制连续英文字母或数字强制换行

#  css使网页图片半透明

体验css+div 背景透明内容不透明的写法
体验css+div 给整个页面添加渐变背景
用css样式控制做成的按钮,取代图片按钮

体验css+div 鼠标经过按钮发生变化效果
体验css+div 文本框自适应窗口宽度
体验css+div 老问题重新讲“怎样使页面整体居中”
体验css+div之图像替换 1.徽标图像替换
体验css+div 使用自动空白边让设计居中
 

 

                                                                                                                   +     

Tags: 广告切换 特效代码 
分类:好站集结 | 评论:0 | 引用:0
上一篇:方便使用的一些小简短input\form代码
下一篇:张美工体验 梦龙雪糕广告---梦龙 专享你的非常礼遇 欠缺处 提出的意见

或许你还对下面的文章感兴趣

Comments

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

<#template:pagebar#>

最新文章

最新评论

Guest