宇宙星空三D背景

1.在 var Xpos = 220; 中修改離視窗左邊距離尺寸 

2.在 var Ypos = 120; 中修改離視窗頂端距離尺寸


<!--宇宙立體_開始-->
<script language=JavaScript>
if (document.all){
with (document){
write('<div id="starsDiv" style="position:absolute;top:0px;left:0px">')
write('<div style="position:relative;width:1px;height:1px;background:#DDFFFF;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#DDFFF6;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#DDFFEE;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#DDFFE5;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#DDFFDD;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#E5FFDD;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#EEFFDD;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#F6FFDD;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#FFFFDD;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#FFF6DD;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#FFEEDD;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#FFE5DD;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#FFDDDD;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#EECCCC;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#EED4CC;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#EEDDCC;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#EEE5CC;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#EEEECC;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#E5EECC;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#DDEECC;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#D4EECC;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#CCEECC;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#CCEED4;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#CCEEDD;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#CCEEE5;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#CCEEEE;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#CCE5EE;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#CCDDEE;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#CCD4EE;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#D4CCEE;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#DDCCEE;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#E5CCEE;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#EECCEE;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#EECCE5;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#EECCDD;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#EECCD4;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#DDBBC3;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#DDBBCC;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#DDBBD4;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#DDBBDD;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#D4BBDD;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#CCBBDD;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#C3BBDD;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#BBBBDD;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#BBC3DD;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#BBCCDD;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#BBD4DD;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#BBDDDD;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#BBDDD4;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#BBDDCC;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:3px;height:3px;background:#BBDDC3;font-size:3px;visibility:visible"></div>')
write('</div>')
}}
if (document.layers)
var yBase = 10;
var xBase = 10;
var step = 0.5;
var currStep = 0;
var Xpos = 220; //離視窗左邊距離尺寸
var Ypos = 120; //離視窗頂端距離尺寸
if (document.all)
{
  function MoveHandler(){
  Xpos = document.body.scrollLeft+event.x;
  Ypos = document.body.scrollTop+event.y;
  };}
else if (document.layers)
{
  function xMoveHandler(evnt){
  Xpos = evnt.pageX;
  Ypos = evnt.pageY;
  }
  window.onMouseMove = xMoveHandler;
}
function animateLogo() {
if (document.all)
{
 yBase = window.document.body.offsetHeight/6;
 xBase = window.document.body.offsetWidth/6;
}
else if (document.layers)
{
 yBase = window.innerHeight/8;
 xBase = window.innerWidth/8;
}
if (document.all)
{
 for ( i = 0 ; i < starsDiv.all.length ; i++ )
 {
  starsDiv.all[i].style.top = Ypos + yBase*Math.sin((currStep + i*4)/12)*Math.cos(400+currStep/200);
 starsDiv.all[i].style.left = Xpos + xBase*Math.sin((currStep + i*3)/10)*Math.sin(currStep/200);
 }}
else if (document.layers)
{
 for ( j = 0 ; j < 14 ; j++ ) //number of NS layers!
 {
  var templayer="a"+j
  document.layers[templayer].top = Ypos + yBase*Math.sin((currStep + j*4)/12)*Math.cos(400+currStep/200);
  document.layers[templayer].left = Xpos + xBase*Math.sin((currStep + j*3)/10)*Math.sin(currStep/200);
 }}
currStep+= step;
setTimeout("animateLogo()", 10);
}
animateLogo();
</script>
<!--宇宙立體_結束-->

arrow
arrow
    全站熱搜

    nicole 發表在 痞客邦 留言(0) 人氣()