Gamer`s Club

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » Gamer`s Club » Скрипты. » Новогодние скрипты.


Новогодние скрипты.

Сообщений 1 страница 7 из 7

1

Снежинки (или что угодно  :rolleyes: )

Код:
<script type="text/javascript">
  
  //Указываете путь к снежинкам
  var snowsrc="http://img405.imageshack.us/img405/7272/snowil.png"
  // Количество снежинок
  var no = 10;
  // Настройка через сколько должен исчезнуть снег (0=никогда):
  var hidesnowtime = 0;
  // Настройка где снежинки должны исчезать (по высоте окна "windowheight" или по высоте страницы "pageheight")
  var snowdistance = "pageheight";


  var ie4up = (document.all) ? 1 : 0;
  var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

    function iecompattest(){
    return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
    }

  var dx, xp, yp;    // coordinate and position variables
  var am, stx, sty;  // amplitude and step variables
  var i, doc_width = 800, doc_height = 600; 
  
  if (ns6up) {
    doc_width = self.innerWidth;
    doc_height = self.innerHeight;
  } else if (ie4up) {
    doc_width = iecompattest().clientWidth;
    doc_height = iecompattest().clientHeight;
  }

  dx = new Array();
  xp = new Array();
  yp = new Array();
  am = new Array();
  stx = new Array();
  sty = new Array();
  snowsrc=(snowsrc.indexOf("dynamicdrive.com")!=-1)? "snow.gif" : snowsrc
  for (i = 0; i < no; ++ i) {  
    dx[i] = 0;                        // set coordinate variables
    xp[i] = Math.random()*(doc_width-50);  // set position variables
    yp[i] = Math.random()*doc_height;
    am[i] = Math.random()*20;         // set amplitude variables
    stx[i] = 0.02 + Math.random()/10; // set step variables
    sty[i] = 0.7 + Math.random();     // set step variables
        if (ie4up||ns6up) {
      if (i == 0) {
        document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://dynamicdrive.com\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/div>");
      } else {
        document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
      }
    }
  }

  function snowIE_NS6() {  // IE and NS6 main animation function
    doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;
        doc_height=(window.innerHeight && snowdistance=="windowheight")? window.innerHeight : (ie4up && snowdistance=="windowheight")?  iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")? iecompattest().scrollHeight : iecompattest().offsetHeight;
    for (i = 0; i < no; ++ i) {  // iterate for every dot
      yp[i] += sty[i];
      if (yp[i] > doc_height-50) {
        xp[i] = Math.random()*(doc_width-am[i]-30);
        yp[i] = 0;
        stx[i] = 0.02 + Math.random()/10;
        sty[i] = 0.7 + Math.random();
      }
      dx[i] += stx[i];
      document.getElementById("dot"+i).style.top=yp[i]+"px";
      document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px";  
    }
    snowtimer=setTimeout("snowIE_NS6()", 10);
  }

    function hidesnow(){
        if (window.snowtimer) clearTimeout(snowtimer)
        for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden"
    }
        

if (ie4up||ns6up){
    snowIE_NS6();
        if (hidesnowtime>0)
        setTimeout("hidesnow()", hidesnowtime*1000)
        }

</script>

http://s014.radikal.ru/i326/1101/18/acd306d99766.jpg

ссылку http://tcse-cms.com/sneg/sneg.gif можно заменить на другую, например http://tcse-cms.com/sneg/ell.gif и тогда будут

http://s47.radikal.ru/i118/1101/ac/22e126045be6.jpg

0

2

Гирлянда.

Код:
<style type="text/css">
#pun {
position: relative;
}
</style>
<div style="height: 30px; background: url(http://allcity.net.ru/other/xmas_lights_repeat.gif) repeat-x 100%; position: relative; top: 30px; left: 0; z-index: 1000;">
</div>

http://s54.radikal.ru/i145/1101/6e/f49daf694d33.jpg

0

3

Снег

Код:
<script type="text/javascript" src="http://akalina.ru/snow.js"></script>

http://i022.radikal.ru/1101/ef/d7a8707a2c40.jpg

0

4

Новогодняя веточка.

Код:
<div style="position:absolute; left:0%; top:0px;"> <IMG SRC = "http://i.rusff.ru/f/ru/rusff/211515.png" граница = "0" /> </ div>

http://s010.radikal.ru/i313/1101/bd/1cb0bc32298f.jpg

С размещением украшений думаю Вы знаете что нужно быть осторожным, вот я перевернул и разместил веточку в правом верхнем углу, перед скриптом часиков:
http://savepic.net/431413.png

теперь после скрипта часиков:
http://savepic.net/443700.png

Думаю пояснять не нужно и так все видно  :) , это же касается ленточек и других украшений.

0

5

Гирлянды

Код:
<div id="idNewYearLampT" style="position: fixed; z-index: 1000; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; background-color: transparent; overflow-x: hidden; overflow-y: hidden; background-image: url(http://forumupload.ru/uploads/000d/8d/19/587-1-f.gif); height: 40px; top: 0px; left: 0px; width: 1007px; background-repeat: repeat no-repeat; "></div>
<div id="idNewYearLampB" style="position: fixed; z-index: 1000; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; background-color: transparent; overflow-x: hidden; overflow-y: hidden; background-image: url(http://forumupload.ru/uploads/000d/8d/19/590-1-f.gif); height: 40px; left: 0px; top: 335px; width: 1007px; background-repeat: repeat no-repeat; "></div>
<div id="idNewYearLampL" style="position: fixed; z-index: 1000; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; background-color: transparent; overflow-x: hidden; overflow-y: hidden; background-image: url(http://forumupload.ru/uploads/000d/8d/19/589-1-f.gif); width: 40px; top: 40px; left: 0px; height: 295px; background-repeat: no-repeat repeat; "></div>
<div id="idNewYearLampR" style="position: fixed; z-index: 1000; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; background-color: transparent; overflow-x: hidden; overflow-y: hidden; background-image: url(http://forumupload.ru/uploads/000d/8d/19/588-1-f.gif); width: 40px; top: 40px; left: 967px; height: 295px; background-repeat: no-repeat repeat; "></div>

http://s005.radikal.ru/i211/1101/d8/01b906329ca3.jpg

Изменяя данные  top,  left, height, width , меняется расположение и длинна гирлянд

0

6

Гирлянда (по периметру окна).

Код:
<script type="text/javascript" src="http://szenprogs.ru/scripts/garland/garland.js"></script> 
<script type="text/javascript"><!-- 
         garland.imgtop = 'http://szenprogs.ru/scripts/garland/girlyanda-t.gif'; 
         garland.imgbottom = 'http://szenprogs.ru/scripts/garland/girlyanda-b.gif'; 
         garland.imgleft = 'http://szenprogs.ru/scripts/garland/girlyanda-l.gif'; 
         garland.imgright = 'http://szenprogs.ru/scripts/garland/girlyanda-r.gif'; 
         garland.height = 30; 
         garland.showleft = true; 
//--> 
</script>

http://s49.radikal.ru/i123/1101/d4/fe1ac5a681e5.jpg

0

7

Гирлянды в названиях разделов

Код:
<style pype="text/css">
#pun-stats h2, .punbb .main h1, .punbb .main h2 { 
background-image: url(http://allcity.net.ru/other/xmas_lights_repeat.gif) !important;
background-position: center bottom;
padding: 0.7em 1em !important;
}
</style>

http://s15.radikal.ru/i189/1101/b0/ba018199c6ae.jpg

Код:
<style pype="text/css">
#pun-stats h2, .punbb .main h1, .punbb .main h2 { 
background-image: url(http://forumupload.ru/uploads/000d/8d/19/587-1-f.gif) !important;
background-position: center bottom;
padding: 0.7em 1em !important;
}
</style>

http://s59.radikal.ru/i164/1101/46/27bc61a42184.jpg

0


Вы здесь » Gamer`s Club » Скрипты. » Новогодние скрипты.