Sunday, April 15, 2012

Ganti Warna Font Sesuai Keinginan

Mau ganti warna tulisan di blog mu? kalau kita yang ganti sih biasa...
tapi kalau pembaca yang ganti?? itu sih liar biasa..:D :D
seperti pada blog ku ini bisa ganti warna tulisan sesuai keinginan kamu kan? :D

cara nya gampang kok
  • Masuk ke Edit HTML kemudian copas script di bawah ini di atas </head>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
  • Setelah itu simpan template lanjutakan ke Elemen Laman.
  • Tambahkan gadget HTML/JavaScript, copas script dibawah ini kedalamnya.
<!-- Code Begins -->
<!-- http://amcied-logica.blogspot.com -->
<style type="text/css">
#tuw-font-change-widget ul {width: auto; overflow: hidden;margin: 0 0 20px !important;padding: 0 !important;list-style; none !important;}
#tuw-font-change-widget ul li {width: 20px !important;height: 20px !important;overflow: hidden;margin: 0 10px 0 0 !important;padding: 2px !important;display: block !important;float: left !important;border: 1px solid #CCCCCC !important;}
#tuw-font-change-widget ul li a {width: 20px !important;height: 20px !important;display: block !important;line-height: 18px !important;text-align: center !important;color: #FFFFFF !important;font-size: 11px !important;font-family: Tahoma !important;text-decoration: none !important; outline: 0 !important;}

#fcw-black { background: #000000 !important; }
#fcw-white { background: #088A08 !important; }
#fcw-blue { background: #0066CC !important; }
#fcw-gray { background: #666666 !important; }
#fcw-red { background: #ed1c24 !important; }
#fcw-yellow { background: #ffff00 !important; }
#fcw-color a { text-indent: -999px !important; }
#fcw-size a { text-indent: 0 !important; background: #333333 !important; }
</style>

<script type="text/javascript">
$(document).ready(function(){
$(" #fcw-color #fcw-black ").click(function() {
$(" .post-body ").css({ color: "#000000" });
return false;
});
$(" #fcw-color #fcw-white ").click(function() {
$(" .post-body ").css({ color: "#088A08" });
return false;
});
$(" #fcw-color #fcw-blue ").click(function() {
$(" .post-body ").css({ color: "#0066CC" });
return false;
});
$(" #fcw-color #fcw-gray ").click(function() {
$(" .post-body ").css({ color: "#666666" });
return false;
});
$(" #fcw-color #fcw-red ").click(function() {
$(" .post-body ").css({ color: "#ed1c24" });
return false;
});
$(" #fcw-color #fcw-yellow ").click(function() {
$(" .post-body ").css({ color: "#ffff00" });
return false;
});
});
</script>

<div id="tuw-font-change-widget">
<div class="tuw-fcw">
<h2> Ganti warna tulisan </h2>
<ul id="fcw-color">
<li> <a id="fcw-black" href="#">black</a> </li>
<li> <a id="fcw-white" href="#">green</a> </li>
<li> <a id="fcw-blue" href="#">blue</a> </li>
<li> <a id="fcw-gray" href="#">gray</a> </li>
<li> <a id="fcw-red" href="#">red</a> </li>
<li> <a id="fcw-yellow" href="#">yellow</a> </li>
</ul>
</div>
</div>
<!-- Code ends -->

bisa di letak kan sesuai selera anda...

selamat mencoba ya..:)
good luck..:)

0 comments:

Post a Comment


Visit this site.

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Online Project management