HostLife - лучший платный хостинг
 

Скоро Новый Год! Украшаем свои Блоги

3

Категория Web-дизайн | Дата публикации: 27-11-2009

Новый год 2010

Дорогие друзья, Новый Год не за горами.

Так давайте же вместе создадим праздничную атмосферу на ваших сайтах.

Для того, чтобы украсить и придать новогоднее настроение Вашему сайту, достаточно сделать три вещи:

1. установить скрипт «Падающий снег»
2. повесить шапочку Деда-Мороза в логотипе
3. установить флеш элемент «До нового года осталось...»

Посмотреть в работе скрипты и украшенный логотип можете ЗДЕСЬ

1. Устанавливаем скрипт «Падающий снег»

Для установки скрипта необходимо перед тегом </head> вставить код:

<SCRIPT language=JavaScript>
Amount=25;

Image0=new Image();
Image0.src="<code class="php string">http://fantasyflash.ru/script/web/image/sneg1.gif</code>";

grphcs=new Array(1)
grphcs[0]="<code class="php string">http://img1.immage.de/271211f747277a246b16fde4dfd36f00f3caa9e79c.gif</code>"
Ypos=new Array();
Xpos=new Array();
Speed=new Array();
Step=new Array();
Cstep=new Array();
ns=(document.layers)?1:0;
if (ns){
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>");
}
}
else{
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write('<img id="si" src="'+rndPic+'" style="position:absolute;top:0px;left:0px">');
}
document.write('</div></div>');
}
WinHeight=(document.layers)?window.innerHeight:window.document.body.clientHeight;
WinWidth=(document.layers)?window.innerWidth:window.document.body.clientWidth;
for (i=0; i < Amount; i++){
 Ypos[i] = Math.round(Math.random()*WinHeight);
 Xpos[i] = Math.round(Math.random()*WinWidth);
 Speed[i]= Math.random()*3+2;
 Cstep[i]=0;//osw
 Step[i]=Math.random()*0.1+0.05;
}//fantasyflash.ru
function fall(){
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 < Amount; i++){
sy = Speed[i]*Math.sin(90*Math.PI/180);
sx = Speed[i]*Math.cos(Cstep[i]);
Ypos[i]+=sy;//osw
Xpos[i]+=sx;
if (Ypos[i] > WinHeight){
Ypos[i]=-60;
Xpos[i]=Math.round(Math.random()*WinWidth);
Speed[i]=Math.random()*5+2;
}
if (ns){
document.layers['sn'+i].left=Xpos[i];
document.layers['sn'+i].top=Ypos[i]+hscrll;
}
else{
si[i].style.pixelLeft=Xpos[i];
si[i].style.pixelTop=Ypos[i]+hscrll;
}
Cstep[i]+=Step[i];
}
setTimeout('fall()',35);
}
fall()
</SCRIPT>

2. Устанавливаем флеш элемент «До нового года осталось...»

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="240" height="155" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="align" value="middle" /><param name="FlashVars" value="currentUnitID=1" /><param name="bgcolor" value="#ffffff" /><param name="src" value="http://img.yandex.net/i/events/ny.swf" /><param name="flashvars" value="currentUnitID=1" /><param name="quality" value="high" /><embed type="application/x-shockwave-flash" width="240" height="155" src="http://img.yandex.net/i/events/ny.swf" quality="high" bgcolor="#ffffff" flashvars="currentUnitID=1" align="middle"></embed></object>

3. Скачиваем PSD файл «Шапки Деда-Мороза»

download

Если Вы слабо представляете, как повесить шапку Деда-Мороза я могу это сделать за Вас, за символическую сумму в 50 рублей.

стучать сюда ася: 41932089два

<SCRIPT language=JavaScript>
Amount=25;

Image0=new Image ();
Image0.src="http://fantasyflash.ru/script/web/image/sneg3.gif";

grphcs=new Array (1)
grphcs[0]="http://fantasyflash.ru/script/web/image/sneg3.gif"

Ypos=new Array ();
Xpos=new Array ();
Speed=new Array ();
Step=new Array ();
Cstep=new Array ();
ns=(document.layers)?1:0;
if (ns){
for (i = 0; i < Amount; i++){
var P=Math.floor (Math.random ()*grphcs.length);
rndPic=grphcs[P];
document.write («<LAYER NAME='sn»+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>");
}
}
else{
document.write ('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < Amount; i++){
var P=Math.floor (Math.random ()*grphcs.length);
rndPic=grphcs[P];
document.write ('<img id="si" src="'+rndPic+'" style="position:absolute;top:0px;left:0px">');
}
document.write ('</div></div>');
}
WinHeight=(document.layers)?window.innerHeight:window.document.body.clientHeight;
WinWidth=(document.layers)?window.innerWidth:window.document.body.clientWidth;
for (i=0; i < Amount; i++){
Ypos[i] = Math.round (Math.random ()*WinHeight);
Xpos[i] = Math.round (Math.random ()*WinWidth);
Speed[i]= Math.random ()*3+2;
Cstep[i]=0;//osw
Step[i]=Math.random ()*0.1+0.05;
}//fantasyflash.ru
function fall (){
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 < Amount; i++){
sy = Speed[i]*Math.sin (90*Math.PI/180);
sx = Speed[i]*Math.cos (Cstep[i]);
Ypos[i]+=sy;//osw
Xpos[i]+=sx;
if (Ypos[i] > WinHeight){
Ypos[i]=-60;
Xpos[i]=Math.round (Math.random ()*WinWidth);
Speed[i]=Math.random ()*5+2;
}
if (ns){
document.layers['sn'+i].left=Xpos[i];
document.layers['sn'+i].top=Ypos[i]+hscrll;
}
else{
si[i].style.pixelLeft=Xpos[i];
si[i].style.pixelTop=Ypos[i]+hscrll;
}
Cstep[i]+=Step[i];
}
setTimeout ('fall ()',35);
}
fall ()
</SCRIPT><SCRIPT language=JavaScript>
Amount=25;

Image0=new Image ();
Image0.src="http://fantasyflash.ru/script/web/image/sneg3.gif";

grphcs=new Array (1)
grphcs[0]="http://fantasyflash.ru/script/web/image/sneg3.gif"

Ypos=new Array ();
Xpos=new Array ();
Speed=new Array ();
Step=new Array ();
Cstep=new Array ();
ns=(document.layers)?1:0;
if (ns){
for (i = 0; i < Amount; i++){
var P=Math.floor (Math.random ()*grphcs.length);
rndPic=grphcs[P];
document.write («<LAYER NAME='sn»+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>");
}
}
else{
document.write ('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < Amount; i++){
var P=Math.floor (Math.random ()*grphcs.length);
rndPic=grphcs[P];
document.write ('<img id="si" src="'+rndPic+'" style="position:absolute;top:0px;left:0px">');
}
document.write ('</div></div>');
}
WinHeight=(document.layers)?window.innerHeight:window.document.body.clientHeight;
WinWidth=(document.layers)?window.innerWidth:window.document.body.clientWidth;
for (i=0; i < Amount; i++){
Ypos[i] = Math.round (Math.random ()*WinHeight);
Xpos[i] = Math.round (Math.random ()*WinWidth);
Speed[i]= Math.random ()*3+2;
Cstep[i]=0;//osw
Step[i]=Math.random ()*0.1+0.05;
}//fantasyflash.ru
function fall (){
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 < Amount; i++){
sy = Speed[i]*Math.sin (90*Math.PI/180);
sx = Speed[i]*Math.cos (Cstep[i]);
Ypos[i]+=sy;//osw
Xpos[i]+=sx;
if (Ypos[i] > WinHeight){
Ypos[i]=-60;
Xpos[i]=Math.round (Math.random ()*WinWidth);
Speed[i]=Math.random ()*5+2;
}
if (ns){
document.layers['sn'+i].left=Xpos[i];
document.layers['sn'+i].top=Ypos[i]+hscrll;
}
else{
si[i].style.pixelLeft=Xpos[i];
si[i].style.pixelTop=Ypos[i]+hscrll;
}
Cstep[i]+=Step[i];
}
setTimeout ('fall ()',35);
}
fall ()
</SCRIPT>

Понравился пост? Поставь оценку!

1 звезда2 звезды3 звезды4 звезды5 звезд (3 голосов, средний: 2.33 из 5)
Загрузка ... Загрузка ...



Комментариев (3)

Ну, шапка деда Мороза мне ни к лицу, а снежок можно было бы попробовать :-D

Блин а шапочку как скачать))) поставить я и сам могу :-D

virus пишет:

Блин а шапочку как скачать))) поставить я и сам могу

Забыл установить ссылку на кнопку скачать.

Теперь можете скачивать.

Ваши мнения

:wink: :twisted: :roll: :oops: :mrgreen: :lol: :kiss :evil: :cry: :-| :-x :-o :-D :-? :) :( 8-O 8)