ANA SAYFA | FORUM | SİTENİZ İÇİN | İÇERİK EKLE | EN YENİLER | EN POPÜLERLER | EN BEĞENİLENLER | REKLAM | İLETİŞİM
Arama:
Tüm kategorilerde Google Forumda JAVAScript Araçlar
// ÖZELLEŞTİR
E-posta:
Şifre:
Üye Ol
|
Şifremi Unuttum
>> PHP Arşivimiz Gelişiyor! (1 yorum)>> ARŞİVİMİZ FORUM AÇILDI! (0 yorum)>> Ramazan Bayramınız kutlu olsun (2 yorum)>> Kurban Bayramı (0 yorum)>> 10 Kasım (1 yorum)
// EN YENİLER
// EN POPÜLER
// Anasayfa » JAVASCRIPT» Yazı efektleri
Oy:
<script language="JavaScript" type="text/javascript"> <!-- // Zoom Text (22-April-2005) // by Vic Phillips http://www.vicsjavascripts.org.uk // Zoom the text size of any section of text // Application Notes // **** Operation // // Clicking the area containing the text or a link referencing the unique ID name of the area // will increase the text size, clicking again will decrease the text size // or // will decrease the text size, clicking again will increase the text size. // Dependent on the event call parameters assigned to the element containing the text // There may be as many applications on a page as required // and all applications may be executed concurrently. // **** The Event Call // // e.g. // <a id="fred" style="font-size:14px;" onclick="zxcZoomText(this,14,20,500);" > // The Quick Brown Fox // </a> // where 'zxcZoomText(this,14,20,500)' : // parameter 0 = the element object or unique ID name (object or string) // parameter 1 = start text size (digits) // parameter 2 = finish text size (digits) // parameter 3 = the speed of change (digits) // **** Absolute Positioning - Displacing Lower elements // // If the element containg the text has the default positioning of 'relative' // the expanding text will display the elements below. // To prevent this the element containing the text must be assigned an inline syle style position of 'position:absolute;' // and nested in an element with a style position of relative. // e.g. // <div style="position:relative;width:140px;height:100px;test-align:center;" > // <div id="fred" style="position:absolute;left:0px;font-size:14px;background-color:#f8cd76;" onclick="zxcZoomText(this,14,20,500);" > // The Quick Brown Fox<br> // The Quick Brown Fox<br> // </div> // </div> // // **** BackGround Image // // Clicking the text area will work best if the area has a back ground image. // The customising variables include the option to include a blank .gif as a background image // Assign this with a black .gif image or is not required null; // **** General // // All variable, function etc. names are prefixed with 'zxc' to minimise conflicts with other JavaScripts // These character are easily changed to characters of choice using global find and replace. // // The Functional Code(about 1.5K) is best as an External JavaScript // // Tested with IE6 and Mozilla FireFox // // **** Customising Variables var zxcBlankImg='http://www.vicsjavascripts.org.uk/StdImages/Blank.gif';// a blank .gif as a background image or null if not required null; // Functional Code - NO NEED to Change var zxcOOPCnt=0; function zxcZoomText(zxcobj,zxcssz,zxcfsz,zxcspd){ if (typeof(zxcobj)=='string'){ zxcobj=document.getElementById(obj); } if (!zxcobj.oopct){ zxcspd=zxcspd||100; if (zxcBlankImg){ zxcobj.style.backgroundImage='url('+zxcBlankImg+')'; } zxcobj.oopct=new zxcOOPTxtZoom(zxcobj,zxcssz,zxcfsz,zxcspd); } clearTimeout(zxcobj.oopct.to); zxcobj.oopct.minmax[4]*=-1; zxcobj.oopct.cngtxt(); } function zxcOOPTxtZoom(zxcobj,zxcssz,zxcfsz,zxcspd){ this.obj=zxcobj; if (zxcobj.style.position){ if (zxcobj.style.position='absolute'){ this.abs=[zxcobj.offsetLeft,zxcobj.offsetWidth]; } } this.ref='zxcoopct'+zxcOOPCnt++; window[this.ref]=this; this.minmax=[zxcssz,Math.min(zxcssz,zxcfsz),Math.max(zxcssz,zxcfsz),zxcspd,(zxcssz<zxcfsz)?-1:1]; this.to=null; } zxcOOPTxtZoom.prototype.cngtxt=function(){ if ((this.minmax[4]>0&&this.minmax[0]<this.minmax[2])||(this.minmax[4]<0&&this.minmax[0]>this.minmax[1])){ this.obj.style.fontSize=(this.minmax[0]+=this.minmax[4])+'px'; if (this.abs){ this.obj.parentNode.style.width=(this.obj.offsetWidth+parseInt(this.obj.style.fontSize))+'px'; this.obj.parentNode.style.left=(parseInt(this.obj.style.fontSize)/2)+'px'; } this.to=this.setTimeOut('cngtxt();',this.minmax[3]); } } zxcOOPTxtZoom.prototype.setTimeOut=function(zxcf,zxcd){ this.to=setTimeout('window.'+this.ref+'.'+zxcf,zxcd); } //--> </script> <div style="position:relative;width:140px;height:120px;test-align:center;" > <div id="fred" style="position:absolute;left:0px;font-size:14px;background-color:#f8cd76;" onclick="zxcZoomText(this,14,20,100);" > The Quick Brown Fox<br> The Quick Brown Fox<br> The Quick Brown Fox<br> The Quick Brown Fox<br> The Quick Brown Fox<br> The Quick Brown Fox<br> </div>
Kodu Kopyala
Hata Bildir | Tavsiye Et
Bu içeriğe oy verin:
Yorumlar / Yeni Yorum Yaz Bu içeriğe yorum yazılmamış.
ANA SAYFA | İÇERİK EKLE | YENİ EKLENENLER | EN POPÜLERLER | EN BEĞENİLENLER | REKLAM | DESTEKLEYENLER | İLETİŞİM
JAVAScript İndir © 2004 - 2009Web Tasarımı: Emir Emiroğlu | Kodlama: Can "FiNaRFiN" HANHAN , Korkut TAHAOĞLU, Göktuğ İÇÖZ