BİLİŞİMİ BURADAN ÖĞRENECEKSİNİZ

KODLAR DÜNYASI

Arka Plan Javascriptler

rengarenk açılan arka plan kodları

<html>
<head>
 
<script language="JavaScript">
 
 
basla=0;
 
var renkler=new Array("000000",
"ffffff",
"ff0000",
"ffff00",
"ffffff",
"000000",
"0000ff",
"00fdff",
"fffddf",
"fadafa",
"f8f8f8",
"000000",
"00f0ff",
"50fdff",
"fffd9f",
"fadafa",
"000000",
"00ccdf");
 
var uzunluk=renkler.length;
 
function gozkirp(){
        if(basla<uzunluk-1){
                document.bgColor=renkler[basla];
                basla++;
                setTimeout("gozkirp()",300);
                }
        }
 
</script>
 
</head>
 
<body onLoad="gozkirp()">
 
</body>
</html>
-----------------------------------------------------------------------------------------------------------
sürekli renk değiştiren arka plan kodu:
<script type="text/javascript">
<!--
function mouseMoving(e){
if( window.event){ 
actual_x = document.body.scrollLeft+window.event.clientX;
actual_y = document.body.scrollTop+window.event.clientY;
}else{
actual_x = e.pageX; 
actual_y = e.pageY;
 
actual_x = Math.abs((Math.round(actual_x/4)%256)-122)*2;
actual_y = Math.abs((Math.round(actual_y/4)%256)-122)*2;
green = Math.round(((255-actual_x) + (255-actual_y))/2);
body_elm = document.getElementsByTagName('body')[0].style;
body_elm.backgroundColor="rgb("+actual_y+","+green+","+actual_x+")";
}
 
document.onmousemove = mouseMoving;
// -->
</script>
------------------------------------------------------------------------------------------------------
her girişde farklı arka plan rengi kodu:
<script language="JavaScript"> 
var bgcolorlist=new Array("#DFDFFF", "#FFFFBF", "#80FF80", "#EAEAFF", "#C9FFA8", "#F7F7F7", "#FFFFFF", "#DDDD00")
document.bgColor=bgcolorlist[Math.floor(Math.random()*bgcolorlist.length)]
</script>
--------------------------------------------------------------------------------------------------------------
kırmızı boya saçan arka plan kodu:
<script type="text/javascript"> 
// <![CDATA[
var speed=33; // lower number for faster
var warp=3; // from 1 to 10
var stars=100; // number of stars
var colour="#FF0000"; // colour of stars
var position=0; // set to '-1' for stars to appear behind text on page
/****************************
*      Star Warp Effect     *
* (c) 2005 mf2fm web-design *
*  http://www.mf2fm.com/rv  *
* DON'T EDIT BELOW THIS BOX *
****************************/
var i;
var strs=new Array();
var strx=new Array();
var stry=new Array();
var stdx=new Array();
var stdy=new Array();
var swide=800;
var shigh=600;
warp/=100;
window.onload=function() { if (document.getElementById) {
  var b, s, temp;
  set_width();
  b=document.createElement("div");
  s=b.style;
  s.position="absolute";
  b.setAttribute("id", "bod");
  document.body.appendChild(b);
  set_scroll();
  for (i=0; i<stars; i++) {
    strs[i]=document.createElement("div");
    strs[i].style.backgroundColor=colour;
    strs[i].style.overflow="hidden";
    strs[i].style.position="absolute";
strs[i].style.zIndex=position;
    stdy[i]=Math.random()*4-2;
    stdx[i]=Math.random()*6-3;
    temp=Math.random()*100;
    strx[i]=swide/2+temp*stdx[i];
    stry[i]=shigh/2+temp*stdy[i];
    if (Math.abs(stdx[i])+Math.abs(stdy[i])>2.66) {
      strs[i].style.width="2px";
      strs[i].style.height="2px";
    }
    else {
      strs[i].style.width="1px";
      strs[i].style.height="1px";
    }
    b.appendChild(strs[i]);
  }
  setInterval("warp_drive()", speed);
}}
function warp_drive() {
  for (i=0; i<stars; i++) {
    stry[i]+=stdy[i];
    strx[i]+=stdx[i];
    stdx[i]*=1+warp;
    stdy[i]*=1+warp;
    if (stry[i]>0 && stry[i]<shigh-3 && strx[i]>0 && strx[i]<swide-3) {
      strs[i].style.left=Math.floor(strx[i])+"px";
      strs[i].style.top=Math.floor(stry[i])+"px"
    }
    else {
      strx[i]=swide/2;
      stry[i]=shigh/2;
      stry[i]+=stdy[i]=Math.random()*4-2;
      strx[i]+=stdx[i]=Math.random()*6-3;
      if (Math.abs(stdx[i])+Math.abs(stdy[i])>2.66) {
        strs[i].style.width="2px";
        strs[i].style.height="2px";
      } 
      else {
        strs[i].style.width="1px";
        strs[i].style.height="1px";
      }
    }
  }
}
window.onresize=set_width;
function set_width() {
  if (typeof(self.innerWidth)=="number") {
    swide=self.innerWidth;
    shigh=self.innerHeight;
  }
  else if (document.documentElement && document.documentElement.clientWidth) {
    swide=document.documentElement.clientWidth;
    shigh=document.documentElement.clientHeight;
  }
  else if (document.body.clientWidth) {
    swide=document.body.clientWidth;
    shigh=document.body.clientHeight;
  }
  swide-=2;
  shigh-=2;
}
window.onscroll=set_scroll;
function set_scroll() {
  var sleft, sdown;
  if (typeof(self.pageYOffset)=="number") {
    sdown=self.pageYOffset;
    sleft=self.pageXOffset;
  }
  else if (document.body.scrollTop || document.body.scrollLeft) {
    sdown=document.body.scrollTop;
    sleft=document.body.scrollLeft;
  }
  else if (document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) {
    sleft=document.documentElement.scrollLeft;
sdown=document.documentElement.scrollTop;
  }
  else {
    sdown=0;
    sleft=0;
  }
  var s=document.getElementById("bod").style;
  s.top=sdown+"px";
  s.left=sleft+"px";
}
// ]]>
</script>
----------------------------------------------------------------------------------------------------------
arka planda havai fişek kodu:
<body bgcolor="#000000">
<script language="JavaScript"> 
<!--  
CL=new Array('#ff0000','#00ff00','#ffffff','#ff00ff','#ffa500','#ffff00','#00ff00','#ffffff','#ff00ff')
CL2=new Array('#ffa500','#00ff00','#FFAAFF','#fff000','#fffffF')
Xpos=130;
Ypos=130;
I='#00ff00';
C=0;
S=5;
H=null;
W=null;
Y=null;
NS4=(document.layers);
NS6=(document.getElementById&&!document.all);
IE4=(document.all);
A=14;
E=120;
L=null;
if (NS4){
for (i=0; i < A; i++)
document.write('<LAYER NAME="nsstars'+i+'" TOP=0 LEFT=0 BGCOLOR='+I+' CLIP="0,0,2,2"></LAYER>');
}
if (NS6){
window.document.body.style.overflow='hidden';
for (i=0; i < A; i++)
document.write('<div id="ns6stars'+i+'" style="position:absolute;top:0px;left:0px;height:2px;width:2px;font-size:2px;background:'+I+'"></div>');
}
if (IE4){
document.write('<div id="ie" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < A; i++)
document.write('<div id="iestars" style="position:absolute;top:0;left:0;width:2px;height:2px;background:'+I+';font-size:2px"></div>');
document.write('</div></div>');
}
function Fireworks(){
H=(NS4||NS6)?window.innerHeight:window.document.body.clientHeight;
W=(NS4||NS6)?window.innerWidth:window.document.body.clientWidth;
Y=(NS4||NS6)?window.pageYOffset:window.document.body.scrollTop;
for (i=0; i < A; i++){
if (IE4)L=iestars[i].style;
if (NS4)L=document.layers["nsstars"+i];
if (NS6)L=document.getElementById("ns6stars"+i).style;
var F=Math.floor(Math.random()*CL.length);
var RS=Math.round(Math.random()*2);
L.top = Ypos + E*Math.sin((C+i*5)/3)*Math.sin(C/100)
L.left= Xpos + E*Math.cos((C+i*5)/3)*Math.sin(C/100)
if (C < 110){
 if (NS4){L.bgColor=I;L.clip.width=1;L.clip.height=1}
 if (IE4||document.getElementById)
 {L.background=I;L.width=1;L.height=1;L.fontSize=1}
 }
else{
 if (NS4){L.bgColor=CL[F];L.clip.width=RS;L.clip.height=RS}
 if (IE4||document.getElementById){L.background=CL[F];L.width=RS;L.height=RS;L.fontSize=RS}
 }
}
if (C > 220){
 C=0;
 var NC=Math.floor(Math.random()*CL2.length);
 I=CL2[NC];
 E=Math.round(100+Math.random()*50);
 Ypos = E+Math.round(Math.random()*(H-(E*2.2)))+Y;
 Xpos = E+Math.round(Math.random()*(W-(E*2.2)));
}
C+=S;
setTimeout("Fireworks()",10);
}
Fireworks();
// -->
</script>
--------------------------------------------------------------------------------------------------------------
arka plan kar efekti:
<body bgcolor=#000000 onLoad="snow()">
<script language="JavaScript"> 
N = 40; 
Y = new Array();
X = new Array();
S = new Array();
A = new Array();
B = new Array();
M = new Array();
V = (document.layers)?1:0;
 
iH=(document.layers)?window.innerHeight:window.document.body.clientHeight;
iW=(document.layers)?window.innerWidth:window.document.body.clientWidth;
for (i=0; i < N; i++){                                                                
 Y[i]=Math.round(Math.random()*iH);
 X[i]=Math.round(Math.random()*iW);
 S[i]=Math.round(Math.random()*5+2);
 A[i]=0;
 B[i]=Math.random()*0.1+0.1;
 M[i]=Math.round(Math.random()*1+1);
}
if (V){
for (i = 0; i < N; i++)
{document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0 BGCOLOR='#FFFFF0' CLIP='0,0,"+M[i]+","+M[i]+"'></LAYER>")}
}
else{
document.write('<div style="position:absolute;top:0px;left:0px">');
document.write('<div style="position:relative">');
for (i = 0; i < N; i++)
{document.write('<div id="si" style="position:absolute;top:0;left:0;width:'+M[i]+';height:'+M[i]+';background:#fffff0;font-size:'+M[i]+'"></div>')}
document.write('</div></div>');
}
function snow(){
var H=(document.layers)?window.innerHeight:window.document.body.clientHeight;
var W=(document.layers)?window.innerWidth:window.document.body.clientWidth;
var T=(document.layers)?window.pageYOffset:document.body.scrollTop;
var L=(document.layers)?window.pageXOffset:document.body.scrollLeft;
for (i=0; i < N; i++){
sy=S[i]*Math.sin(90*Math.PI/180);
sx=S[i]*Math.cos(A[i]);
Y[i]+=sy;
X[i]+=sx; 
if (Y[i] > H){
Y[i]=-10;
X[i]=Math.round(Math.random()*W);
M[i]=Math.round(Math.random()*1+1);
S[i]=Math.round(Math.random()*5+2);
}
if (V){document.layers['sn'+i].left=X[i];document.layers['sn'+i].top=Y[i]+T}
else{si[i].style.pixelLeft=X[i];si[i].style.pixelTop=Y[i]+T} 
A[i]+=B[i];
}
setTimeout('snow()',10);
}
</script>
 
1.) web sitelerinizi kolayca süsleyebilirsiniz
2.) derslerinize çalışabilirsiniz
3.) bilgisayar prog. tüm dersleri genel tekrarları buradan takip edebilirsiniz

Çünkü (programciders.tr.gg) farkıyla
Bu web sitesi ücretsiz olarak Bedava-Sitem.com ile oluşturulmuştur. Siz de kendi web sitenizi kurmak ister misiniz?
Ücretsiz kaydol