کد ایجاد پرده باز شو در ابتدای لود سایت
کد ایجاد پرده باز شو در ابتدای لود سایت با این کد شما در ابتدای لود سایت خود میتوانید از یک پرده رنگی ساده و دلنشین استفاده کنید.در کد میتوانید سرعت محو شدن پرده رنگی و ترکیب رنگها را تغییر دهید تا به دلخواه شما در بیاد.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
<div style="position:absolute;top:-200%;"><h1><a href="http://www.codebazan.ir/">کدبازان</a></h1></div> <style> <!-- .intro{ position:fixed; left:0; top:0; layer-background-color:red; background-color:#006666; border:8px solid yellow ; z-index:10; } --> </style> <div id="i1" class="intro"></div><div id="i2" class="intro"></div> <script> var speed=5 var temp=new Array() var temp2=new Array() var clipbottom=(window.innerHeight)?parseInt(window.innerHeight)/2:document.body.offsetHeight/2 cliptop=0 for (i=1;i<=2;i++){ temp[i]=document.getElementById("i"+i).style temp[i].width=(window.innerWidth)?(window.innerWidth-15) + 'px' :document.body.clientWidth + 'px' temp[i].height=(window.innerWidth)?window.innerHeight/2 + 'px' :document.body.offsetHeight/2 + 'px' temp[i].top=(i-1)*parseInt(temp[i].height) + 'px' } function openit(){ clipbottom-=speed temp[1].clip="rect(0 auto "+clipbottom+"px 0)" cliptop+=speed temp[2].clip="rect("+cliptop+"px auto auto auto)" if (clipbottom<=-5){ clearInterval(stopit) temp[1].display="none" temp[2].display="none" } } function codebazan(){ stopit=setInterval("openit()",100) } codebazan() </script> |