html星空特效代码复制(星空代码html5)

http://www.itjxue.com  2023-02-05 07:14  来源:未知  点击次数: 

用FLASH做星空中星星闪烁效果,找来一段代码,可闪烁的时候背景也跟着动,星星闪的速度想慢点怎么调整?

星星需要先设置实例名称“star”(选中星星影片剪辑,打开属性-实例名称处设置),然后代码第一句这样改:

star.onEnterFrame=function(){

速度要慢,需要影片剪辑内部,将星星的闪烁动画中间的帧加长一些。

html中可以星空的背景吗

可以的

例如下面这段代码

body{

background:?url(图片)?no-repeat?0?0?transparent;

background-size:?200%?auto;//防止图片不够大

}

网页的星空背景代码

要完成此效果需要两个步骤

第一步:把如下代码加入到body区域中

script language="JavaScript"

!--

SmallStars = 30;

LargeStars = 10;

SmallYpos = new Array();

SmallXpos = new Array();

LargeYpos = new Array();

LargeXpos = new Array();

Smallspeed= new Array();

Largespeed= new Array();

ns=(document.layers)?1:0;

if (ns){

for (i = 0; i SmallStars; i++)

{document.write("LAYER NAME= sn"+i+" LEFT=0 TOP=0 BGCOLOR= #FFFFF0 CLIP= 0,0,1,1 /LAYER")}

for (i = 0; i LargeStars; i++)

{document.write("LAYER NAME= ln"+i+" LEFT=0 TOP=0 BGCOLOR= #FFFFFF CLIP= 0,0,2,2 /LAYER")}

}

else{

document.write( div style="position:absolute;top:0px;left:0px" );

document.write( div style="position:relative" );

for (i = 0; i SmallStars; i++)

{document.write( div id="si" style="position:absolute;top:0;left:0;width:1px;height:1px;background:#fffff0;font-size:1px"/div )}

document.write( /div );

document.write( /div );

document.write( div style="position:absolute;top:0px;left:0px" );

document.write( div style="position:relative" );

for (i = 0; i LargeStars; i++)

{document.write( div id="li" style="position:absolute;top:0;left:0;width:2px;height:2px;background:#ffffff;font-size:2px"/div )}

document.write( /div );

document.write( /div );

}

WinHeight=(document.layers)?window.innerHeight:window.document.body.clientHeight;

WinWidth=(document.layers)?window.innerWidth:window.document.body.clientWidth;

//Inital placement!

for (i=0; i SmallStars; i++)

{

SmallYpos[i] = Math.round(Math.random()*WinHeight);

SmallXpos[i] = Math.round(Math.random()*WinWidth);

Smallspeed[i]= Math.random()*5+1;

}

for (i=0; i LargeStars; i++)

{

LargeYpos[i] = Math.round(Math.random()*WinHeight);

LargeXpos[i] = Math.round(Math.random()*WinWidth);

Largespeed[i]= Math.random()*10+5;

}

function fly(){

var WinHeight=(document.layers)?window.innerHeight:window.document.body.clientHeight;

var WinWidth=(document.layers)?window.innerWidth:window.document.body.clientWidth;

var hscrll=(document.layers)?window.pageYOffset:document.body.scrollTop;

var wscrll=(document.layers)?window.pageXOffset:document.body.scrollLeft;

for (i=0; i LargeStars; i++)

{

LargeXpos[i]-=Largespeed[i];

if (LargeXpos[i] -10)

{

LargeXpos[i]=WinWidth;

LargeYpos[i]=Math.round(Math.random()*WinHeight);

Largespeed[i]=Math.random()*10+5;

}

if (ns){

document.layers[ ln +i].left=LargeXpos[i];

document.layers[ ln +i].top=LargeYpos[i]+hscrll;

}

else{

li[i].style.pixelLeft=LargeXpos[i];

li[i].style.pixelTop=LargeYpos[i]+hscrll;

}

}

for (i=0; i SmallStars; i++)

{

SmallXpos[i]-=Smallspeed[i];

if (SmallXpos[i] -10)

{

SmallXpos[i]=WinWidth;

SmallYpos[i]=Math.round(Math.random()*WinHeight);

Smallspeed[i]=Math.random()*5+1;

}

if (ns){

document.layers[ sn +i].left=SmallXpos[i];

document.layers[ sn +i].top=SmallYpos[i]+hscrll;

}

else{

si[i].style.pixelLeft=SmallXpos[i];

si[i].style.pixelTop=SmallYpos[i]+hscrll;

}

}

setTimeout( fly() ,10);

}

//fly();

//--

/script

第二步:把“onLoad="fly()"”加在body标记里

例如:body onLoad="fly()"

QQ空间星空代码

不知道你说的是哪个 这是现在所有免费代码了

QQ边框代码:

爱的甜蜜蜜 javascript:window.top.space_addItem(16,21903,0,80,500,500,0);

爱你一生不变 javascript:window.top.space_addItem(16,21904,0,80,500,500,0);

爱情轨迹 javascript:window.top.space_addItem(16,21905,0,80,500,500,0);

爱情之旅 javascript:window.top.space_addItem(16,21906,0,80,650,650,0);

回味爱情 javascript:window.top.space_addItem(16,21907,0,80,500,500,0);

偏偏喜欢你 javascript:window.top.space_addItem(16,21908,0,80,500,500,0);

收获爱情 javascript:window.top.space_addItem(16,21909,0,80,500,500,0);

谢谢你的爱 javascript:window.top.space_addItem(16,21910,0,80,500,500,0);

有你真精彩 javascript:window.top.space_addItem(16,21911,0,80,500,500,0);

真的很想你 javascript:window.top.space_addItem(16,21912,0,80,500,500,0);

QQ空间模块移动代码:

版块靠左代码——javascript:window.top.space_addItem(1,9475,0,0,1,1,93);

版块居中代码——javascript:window.top.space_addItem(1,9475,100,0,1,1,93);

版块右移代码——javascript:window.top.space_addItem(1,9475,235,0,1,1,93);

迷失自我:

版块靠左代码——javascript:window.top.space_addItem(1,9475,0,0,1,1,94);

版块居中代码——javascript:window.top.space_addItem(1,9475,100,0,1,1,94);

版块右移代码——javascript:window.top.space_addItem(1,9475,235,0,1,1,94);

彩虹云朵:

版块靠左代码——javascript:window.top.space_addItem(1,8674,0,80,100,100,94);

版块居中代码——javascript:window.top.space_addItem(1,8674,100,80,100,100,94);

版块右移代码——javascript:window.top.space_addItem(1,8674,235,80,100,100,94);

蓝星闪烁:

版块靠左代码——javascript:window.top.space_addItem(1,8674,0,80,100,100,93);

版块居中代码——javascript:window.top.space_addItem(1,8674,100,80,100,100,93);

版块右移代码——javascript:window.top.space_addItem(1,8674,235,80,100,100,93);

浓情马克:

版块靠左代码——javascript:window.top.space_addItem(1,11273,0,80,0,0,94);

版块居中代码——javascript:window.top.space_addItem(1,11273,100,80,0,0,94);

版块右移代码——javascript:window.top.space_addItem(1,11273,235,80,0,0,94);

蓝色皮肤:

版块靠左代码——javascript:window.top.space_addItem(1,11762,0,0,96,96,94);

版块居中代码——javascript:window.top.space_addItem(1,11762,100,0,96,96,94);

版块右移代码——javascript:window.top.space_addItem(1,11762,235,0,96,96,94);

版块右移代码:

黑色:javascript:window.top.space_addItem(1,12736,230,80,0,0,20);

黑色:javascript:window.top.space_addItem(1,9475,230,80,0,0,20);

紫黑:javascript:window.top.space_addItem(1,8669,230,80,0,0,20);

蓝色:javascript:window.top.space_addItem(1,11762,230,80,0,0,20);

隐藏导航代码

javascript:window.top.space_addItem(13,1333,0,80,0,0,94);

隐藏播放器代码

javascript:window.top.space_addItem(6,676,1899,0,200,200,0);

去除横幅代码:

黄钻专用去横幅代码:javascript:window.top.space_addItem(19,15330,0,0,0,0,10000);

QQ空间皮肤代码

七色彩虹:javascript:window.top.space_addItem(1,8674,0,80,100,100,94);

灰色皮肤代码:javascript:window.top.space_addItem(1,6300,0,0,0,0,1);

黑色皮肤:javascript:window.top.space_addItem(1,9475,20,100,0,0,93);

黑暗世界javascript:window.top.space_addItem(1,9475,0,0,1,1,94);

红极一时javascript:window.top.space_addItem(1,11273,0,80,0,0,93);

黑星耀眼javascript:window.top.space_addItem(1,12736,0,80,0,0,93);

玫瑰花javascript:window.top.space_addItem(1,8669,100,80,100,100,123);

静悄悄 javascript:window.top.space_addItem(1,8669,100,80,100,100,94); (带花、居中)

快乐十分javascript:window.top.space_addItem(1,8674,0,80,100,100,94); (彩虹)

迷失世界javascript:window.top.space_addItem(1,9475,0,0,1,1,94);(这个是黑的)

蓝色 javascript:window.top.space_addItem(1,11762,0,0,96,96,94); (蓝的)

睡美人(很漂亮)javascript:window.top.space_addItem(13,9758,0,0,200,600,0);

白色可爱风格:javascript:window.top.space_addItem(1,4703,0,80,0,0,94);

爱情系列:

javascript:window.top.space_addItem(1,7513,0,80,0,0,94);

全红免费皮肤:javascript:window.top.space_addItem(1,11273,0,80,0,0,93);

全橙样式:javascript:window.top.space_addItem(1,15306,0,80,0,0,93);

全蓝样式:javascript:window.top.space_addItem(1,15116,0,80,0,0,93);

全紫样式:javascript:window.top.space_addItem(1,15116,0,80,0,0,93);

淡淡粉色:javascript:window.top.space_addItem(1,7513,0,80,0,0,93);

全绿样式:javascript:window.top.space_addItem(1,7619,0,80,0,0,93);

全粉样式:javascript:window.top.space_addItem(1,4693,0,80,0,0,93);

米白色:javascript:window.top.space_addItem(1,4703,0,80,0,0,94);

紫色带星光: javascript:window.top.space_addItem(1,7510,0,80,0,0,93);

橘黄色:javascript:window.top.space_addItem(1,7513,0,80,0,0,93);

水果绿:javascript:window.top.space_addItem(1,7619,0,80,0,0,93);

浅粉红:javascript:window.top.space_addItem(1,4693,0,0,0,0,93);

天际蓝:javascript:window.top.space_addItem(1,15166,0,80,0,0,93);

怎么用html代码复制

/1、网页代码如下:

script?language=javascript

???//?自动?COPY?代码开始

???function?MM_findObj(n,?d)?{?//v4.0

???var?p,i,x;?if(!d)?d=document;?if((p=n.indexOf("?"))0parent.frames.length)?{

???d=parent.frames[n.substring(p+1)].document;?n=n.substring(0,p);}

???if(!(x=d[n])d.all)?x=d.all[n];?for?(i=0;!xid.forms.length;i++)?x=d.forms[n];

???for(i=0;!xd.layersid.layers.length;i++)?x=MM_findObj(n,d.layers.document);

???if(!x??document.getElementById)?x=document.getElementById(n);?return?x;

???}

???function?JM_cc(ob){

???var?obj=MM_findObj(ob);?if?(obj)?{

???obj.select();js=obj.createTextRange();js.execCommand("Copy");}

???alert("复制成功!您可以将本页推荐给您QQ或者论坛上的朋友阅读!");

???}

???

???//?自动?COPY?代码结束

???document.write('brbfont?color=red?style=font-size:14px点击复制推荐给您的朋友阅读:/font/binput?name="page_url"?value="'+window.location.href+'"?size="64"?style=color:red?value="点击复制地址给您的朋友阅读"?onClick=JM_cc("page_url")');

???/script

2、复制的HTML代码的话,可以在代码前加上span,在代码后加上/span。例:span这里是你复制的内容!!/span。

html爱心特效代码怎么添加名字

html爱心特效代码添加名字的步骤:

1、在主代码最后增加一个模块document.getelementbyid。

2、在模块document.getelementbyid中增加一个标签div。

3、在标签div中添加所要添加的名字。

4、在主代码中增加模块document.getelementbyid即可完成添加名字。

(责任编辑:IT教学网)

更多