Главная » 2010 » Август » 12 » Классные эффекты с фоном
23:48
Классные эффекты с фоном
Сердечки на фоне:
Code
<center>

<style>
.bgimages img {cursor:hand}
</style>
<script language="JavaScript1.2">
<!--

/*
Live Background Previewer Script-  
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/

function tile(){
if (!document.all)
return
var source=event.srcElement
if (source.tagName=="IMG")
document.body.style.backgroundImage="url("+source.src+")"
}

function restore(){
document.body.style.backgroundImage=''
}
document.body.onclick=restore
//-->
</script>

<span class="bgimages" onClick="tile();event.cancelBubble=true"><img src="http://img352.imageshack.us/img352/7018/animated151ks.gif">
<img src="http://img352.imageshack.us/img352/7592/animated145wf.gif">
<br><img src="http://img295.imageshack.us/img295/5601/animated122hq.gif">
<img src="http://img295.imageshack.us/img295/7503/animated117oj.gif"></span>

Медленное открытие страницы:
Code




<style>
<!--
.intro{
position:absolute;
left:0;
top:0;
layer-background-color:green;
background-color:green;
border:0.1px solid green;
z-index:10;
}
-->
</style>
<div id="p1" class="intro"></div>
<div id="p2" class="intro"></div>
<div id="p3" class="intro"></div>
<div id="p4" class="intro"></div>
<div id="p5" class="intro"></div>
<div id="p6" class="intro"></div>
<div id="p7" class="intro"></div>
<div id="p8" class="intro"></div>
<div id="p9" class="intro"></div>
<div id="p10" class="intro"></div>
<div id="p11" class="intro"></div>
<div id="p12" class="intro"></div>
<div id="p13" class="intro"></div>
<div id="p14" class="intro"></div>
<div id="p15" class="intro"></div>
<div id="p16" class="intro"></div>
<div id="p17" class="intro"></div>
<div id="p18" class="intro"></div>
<div id="p19" class="intro"></div>
<div id="p20" class="intro"></div>
<div id="p21" class="intro"></div>
<div id="p22" class="intro"></div>
<div id="p23" class="intro"></div>
<div id="p24" class="intro"></div>
<div id="p25" class="intro"></div>

<script>

/*
Boxing-away Script- By Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more free DHTML scripts, and TOS,
visit http://www.dynamicdrive.com
*/

var espeed=300
var counter=1
var temp=new Array()
var temp2=new Array()

var ns4=document.layers?1:0
var ie4=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0

////////Code for Netscape NS 4+////
if (ns4){
for (i=1;i<=25;i++){
temp[i]=eval("document.p"+i+".clip")
temp2[i]=eval("document.p"+i)
temp[i].width=window.innerWidth/5
temp[i].height=window.innerHeight/5
}

for (i=1;i<=5;i++)
temp2[i].left=(i-1)*temp[i].width

for (i=6;i<=10;i++){
temp2[i].left=(i-6)*temp[i].width
temp2[i].top=temp[i].height
}

for (i=11;i<=15;i++){
temp2[i].left=(i-11)*temp[i].width
temp2[i].top=2*temp[i].height
}

for (i=16;i<=20;i++){
temp2[i].left=(i-16)*temp[i].width
temp2[i].top=3*temp[i].height
}

for (i=21;i<=25;i++){
temp2[i].left=(i-21)*temp[i].width
temp2[i].top=4*temp[i].height
}

}

function erasecontainerns(){
window.scrollTo(0,0)
var whichcontainer=Math.round(Math.random()*25)
if (whichcontainer==0)
whichcontainer=1
if (temp2[whichcontainer].visibility!="hide")
temp2[whichcontainer].visibility="hide"
else{
while (temp2[whichcontainer].visibility=="hide"){
whichcontainer=Math.round(Math.random()*25)
if (whichcontainer==0)
whichcontainer=1
}
temp2[whichcontainer].visibility="hide"
}

if (counter==25)
clearInterval(beginerase)

counter++
espeed-=10

}

////////End code for NS 4+////////

///////////Code for IE 4+ and NS6/////////

if (ie4||ns6){
var containerwidth=ns6?parseInt(window.innerWidth)/5-3 : parseInt(document.body.clientWidth/5)
var containerheight=ns6?parseInt(window.innerHeight)/5-2 : parseInt(document.body.offsetHeight/5)

for (i=1;i<=25;i++){
temp[i]=ns6?document.getElementById("p"+i).style : eval("document.all.p"+i+".style")
temp[i].width=containerwidth
temp[i].height=containerheight
}

for (i=1;i<=5;i++)
temp[i].left=(i-1)*containerwidth

for (i=6;i<=10;i++){
temp[i].left=(i-6)*containerwidth
temp[i].top=containerheight
}

for (i=11;i<=15;i++){
temp[i].left=(i-11)*containerwidth
temp[i].top=2*containerheight
}

for (i=16;i<=20;i++){
temp[i].left=(i-16)*containerwidth
temp[i].top=3*containerheight
}

for (i=21;i<=25;i++){
temp[i].left=(i-21)*containerwidth
temp[i].top=4*containerheight
}
}

function erasecontainerie(){
window.scrollTo(0,0)
var whichcontainer=Math.round(Math.random()*25)
if (whichcontainer==0)
whichcontainer=1
if (temp[whichcontainer].visibility!="hidden")
temp[whichcontainer].visibility="hidden"
else{
while (temp[whichcontainer].visibility=="hidden"){
whichcontainer=Math.round(Math.random()*25)
if (whichcontainer==0)
whichcontainer=1
}
temp[whichcontainer].visibility="hidden"
}

if (counter==25){
clearInterval(beginerase)
if (ns6){
for (i=1;i<26;i++)
temp[i].display="none"
}
}
counter++
espeed-=10

}

/////////End IE 4+ code////////

if (ns4)
beginerase=setInterval("erasecontainerns()",espeed)
else if (ie4||ns6){
beginerase=setInterval("erasecontainerie()",espeed)
}

</script>

2.
Code



<style>
<!--
.intro{
position:absolute;
left:0;
top:0;
layer-background-color:white;
background-color:white;
border:0.1px solid white;
z-index:8;
}
-->
</style>
<div id="i1" class="intro"></div>
<script language="JavaScript1.2">

/*
Boxing In Script-© Dynamic Drive (www.dynamicdrive.com)
For source code, installation instructions, 100's DHTML scripts, and TOS,
visit http://www.dynamicdrive.com
*/

var ns4=document.layers?1:0
var ie4=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0

//change speed here
var speed=5
if (ns4){
var reference=window.innerWidth/window.innerHeight
var temp=eval("document.i1.clip")
temp.left=temp.top=0
temp.right=window.innerWidth
temp.bottom=window.innerHeight
}
else if (ie4||ns6){
var reference=ns6?parseInt(window.innerWidth)/window.innerHeight: document.body.clientWidth/document.body.clientHeight
var rightclip,leftclip,topclip,bottomclip
var temp=ns6?document.getElementById("i1").style:document.all.i1.style
topclip=leftclip=0
rightclip=temp.width=ns6?window.innerWidth*0.98:document.body.clientWidth
bottomclip=temp.height=ns6?window.innerHeight-2:document.body.clientHeight
}

function doit(){
window.scrollTo(0,0)
if (ns4){
if (temp.left>window.innerWidth/2)
clearInterval(stopit)
temp.left+=reference*speed
temp.top+=speed
temp.right-=reference*speed
temp.bottom-=speed
}
else if (ie4||ns6){
halfofbrowser=ns6?parseInt(window.innerWidth/2):document.body.clientWidth/2
if (leftclip>halfofbrowser){
clearInterval(stopit)
temp.display="none"
}
temp.clip="rect( "+topclip+" "+rightclip+" "+bottomclip+" "+leftclip+")"
leftclip+=reference*speed
topclip+=speed
rightclip-=reference*speed
bottomclip-=speed
}
}
stopit=setInterval("doit()",100)

</script>
Вы сможете скачать через 0 сек.
Категория: Другие скрипты для uCoz | Просмотров: 486 | Добавил: HiP-HoP | Теги: фоном, эффекты, Классные | Рейтинг: 0.0/0
Всего комментариев: 0
Добавлять комментарии могут только зарегистрированные пользователи.
[ Регистрация | Вход ]