All post

Tampilkan postingan dengan label text. Tampilkan semua postingan
Tampilkan postingan dengan label text. Tampilkan semua postingan

Rabu, 01 April 2009

Membuat teks terbalik

Iseng ngerjain Membuat text kebalik yuk? Teks kebalik Maksudnya apaan sih? Nah coba ndiri,klo udah nyoba pasti pernah tau yang namanya text kebalik.. Sekedar buat iseng2.. Ya maksudnya teks yang tengkurap jadi telentang,teks telentang jadi tengkurap, teks nengok kiri jadi nengok kanan dan sebaliknya.. Ngerti kan.. bingung ya?.. Cobain ndiri deh dri pada bingung..

Flip

Original:
Flipped:
Kalo yg tertarik mo meletakan nya di blog ikuti langkah di bawah ini



1.login blogger


2.tata letak

3.tambah widget


4.pilih javascript/html


5.paste code di bawah ini



<style type="text/css">
textarea { font-family: "Arial Unicode", Batang }
</style> <script language="JavaScript">
function flip() {
var result = flipString(document.f.original.value.toLowerCase());
document.f.flipped.value = result;
}

function flipString(aString) {
var last = aString.length - 1;
//Thanks to Brook Monroe for the
//suggestion to use Array.join
var result = new Array(aString.length)
for (var i = last; i >= 0; --i) {
var c = aString.charAt(i)
var r = flipTable[c]
result[last - i] = r != undefined ? r : c
}
return result.join('')
}

var flipTable = {
a : '\u0250',
b : 'q',
c : '\u0254', //open o -- from pne
d : 'p',
e : '\u01DD',
f : '\u025F', //from pne
g : '\u0183',
h : '\u0265',
i : '\u0131', //from pne
j : '\u027E',
k : '\u029E',
//l : '\u0283',
m : '\u026F',
n : 'u',
r : '\u0279',
t : '\u0287',
v : '\u028C',
w : '\u028D',
y : '\u028E',
'.' : '\u02D9',
'[' : ']',
'(' : ')',
'{' : '}',
'?' : '\u00BF', //from pne
'!' : '\u00A1',
"\'" : ',',
'<' : '>',
'_' : '\u203E',
';' : '\u061B',
'\u203F' : '\u2040',
'\u2045' : '\u2046',
'\u2234' : '\u2235',
'\r' : '\n' //thank you, Yeeliberto
}

for (i in flipTable) {
flipTable[flipTable[i]] = i
}

</script> <h1>
Flip</h1>
<form name="f">
Original: <textarea rows="5" cols="50" name="original" onkeyup="flip()"></textarea><input value="Flip" onclick="flip()" type="button">
Flipped: <textarea rows="5" cols="50" name="flipped"></textarea> </form>
<br/> <p> Widget by: <a href="http://oce-modifblog.blogspot.com">modifikasi blog</a> </p>


6.save

selanjutnya...

Kamis, 26 Maret 2009

Buat teks bergelombang

Asal posting neh.. Bis ga da bahan.. Dimana2 dah ada.. Buat ni aja teks yg bergelobang seperti roller coaster.. Guna ga guna mgkn dapt membantu menghiasi blog dengan kreatif anda..
Contohnya :

Untuk menjadikan teks bergelobang seperti di atas, copy paste script di bawah dan ganti teks semau anda..
<script> /* Script free from Http://Oce-modifblog.blogspot.com Roller Coaster Script- By JavaScript Kit Over 200+ other free scripts here! http://javascriptkit.com */ var fs=1 var direction="right" function rollertext(whichone){ var thetext=whichone for (i=0;i<thetext.length;i++){ document.write(thetext.charAt(i).fontsize(fs)) if (fs<7&&direction=="right") fs++ else if (fs==7){ direction="left" fs-- } else if (fs==1){ direction="right" fs++ } else if (fs>1&&direction=="left") fs-- } } //Change below text to your won rollertext("Life is like a roller coaster ride. Hang on tight!") </script>
ganti teks warna merah dengan teks anda..

selanjutnya...

Senin, 16 Februari 2009

Text zoom over mouse

Buat zom text seperti dibawah ini

Codenya di bawah ini <html> <head> <style type="text/css"> body {margin:0; padding:0; position:absolute; overflow:hidden; background:#000; left:0; top:0; width:100%; height:100%; font-size: 12px; font-family: arial; font-weight: normal; color: #666; } .word { cursor: pointer; color: #666; position: absolute; z-index: 1; } .word_over { cursor: pointer; color: #FFF; position: absolute; z-index: 1; } .word_zoom { position: absolute; font-weight: bold; z-index: 0; } </style> <script type="text/javascript"><!-- // ==================================================== // script: Gerard Ferrandez - Ge-1-doot - June 2005 // http://www.dhteumeuleu.com/ // ==================================================== window.onerror = new Function("return true"); document.onselectstart = new Function("return false"); var object = new Array(); var margin = 20; var K = 0; function CObj(N,x,y,txt){ this.obj = document.createElement("span"); this.obj.innerHTML = txt; this.obj.className = "word"; this.obj.onmouseover = new Function("this.className='word_over',object["+N+"].izoom();"); document.getElementById("sp").appendChild(this.obj); this.obj.style.left = x; this.obj.style.top = y; this.obz = 0; this.x = x; this.y = y; this.x0 = x; this.y0 = y; this.fs = 12; this.c = 0; this.px = txt.length * .02; this.py = .04; this.zoom = function () { with(this){ fs *= 1.08; c = 512 - fs * 2; x -= fs * px; y -= fs * py; with(obz.style){ left = x; top = y; fontSize = Math.round(fs); color = "RGB("+Math.round(c*.5)+","+Math.round(c*.5)+","+Math.round(c)+")"; } if(c<8){ document.getElementById("sp").removeChild(obz); obj.className="word"; x = x0; y = y0; fs = 12; obz = 0; K--; } else setTimeout("object["+N+"].zoom();",16); } } this.izoom = function () { with(this){ if(K<20){ if(obz == 0){ obz = document.createElement("span"); obz.className = "word_zoom"; obz.innerHTML = txt; obz.style.left = x-1; obz.style.top = y; document.getElementById("sp").appendChild(obz); zoom(); K++; } } else setTimeout("object["+N+"].izoom();",128); } } } function fontWidth(word){ // arial font var S = "a68b68c68d68e68f31g68h68i31j31k68l31m108n68o68p68q68r39s68t39u68v50w90x68y68z68A90B90C90D90E90F78G98H90I28J59K90L68M108N90O98P90Q98R90S90T68U90V90W130X68Y90Z68'30.42!29?68-41/41=72"; var l = word.length; var s = 0; var x = 0; var c = 0; for(i=0;i<l;i++){ c = word.charAt(i); x = S.indexOf(c); if(c>="0" && c<="9")s+=69; else if(x>=0)s+=parseInt(S.substring(x+1,x+4)); else s+=68; } return s/10; } onload = function(){ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// T = [ "window html head title document absolute", "new function txt return position justify", "false var object Array this x y px py", "parent length span body get Element By Id", "div create Element RGB class Name inner HTML", "if append Child zoom overflow hidden with", "style left top font Size color false Math", "onerror cursor font Weight obj round parent", "get Elements By Tag Name font Size background", "#000000 remove Child script set Timeout run", "for zIndex width height on mouse over return true" ]; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// x = 0; y = 0; k = 0; for(j in T){ Tx = T[j].split(" "); // justify xt = 0; for(i in Tx){ txt = Tx[i]; xt += fontWidth(txt); } if(Tx.length)sP = (-2*margin + parseInt(document.getElementById("sp").style.width) - xt) / (Tx.length-1); else sP = 0; // insert word for(i in Tx){ txt = Tx[i]; if(txt) { object[k] = new CObj(k, margin+x, margin+y, txt); x += (fontWidth(txt)+sP); k++; } } y += 18; x = 0; } } //--> </script> </head> <body> <div style="position:absolute;left:50%;top:50%"> <div id="sp" style="position:absolute;width:300;height:240;left:-150;top:-120;overflow:hidden;background:#111;cursor:pointer"> </div> </div> </body></html>
warna biru adalah text yang akan muncul

selanjutnya...