Mau background blog warnanya bisa ganti-ganti? Background atau latar belakang pada sebuah blog biasanya pada default penampilan akan berwarna putih (standar bahasa html pada warna kalau tidak dikasih kode warna). Ada kabar gembira nih bagi para sobat blogger yang backgroundnya berwarna default (putih). Kabarnya yaitu bagaimana membuat background tersebut bisa dirubah warnanya dengan menggunakan trik sederhana! Bagi sobat yang mau memakai trik ini, harap dicek dahulu di dalam templatenya pada kode berikut...
<option value="#KODEWARNA">NAMA WARNA
Meletakannya diatas/sebelum kode </select>. Script dan kode alternatif lainnya yang dapat digunakan.
Kode CSS diatas tersebut pasti berbeda pada punya kalian!!! Tapi perhatikan saja pada kode color dan background. Hapus kode tersebut agar trik ini bisa berhasil.body {
padding: 0;
margin:0;
padding-top:12px;
font-size:11pt;
font-family:georgia,"Times New Roman",serif;
text-align:center;
color:#9c9884;
background: url("http://gambar-background-template.gif") no-repeat;
}
- Login ke account Blog sobat.
- Pada halaman Dashboard ► Layout ► Page Elements ► Add a Gadget ► Pilih yang HTML/JavaScript.
- Masukkan deh ramuan berikut [..]
- SAVE dan lihat deh hasil ramuannya ^_^.
<form>
<select size=1 name=clr onChange="document.bgColor=this.options[this.selectedIndex].value">
<option value="#FFFFFF" selected>Warna Background
<option value="#FF0000">Merah
<option value="#FFFF00">Kuning
<option value="#0099FF">Biru
<option value="#00CC00">Hijau
<option value="#CC9900">Coklat
<option value="#FF66FF">Pink
<option value="#000000">Hitam
</select>
</form>
<select size=1 name=clr onChange="document.bgColor=this.options[this.selectedIndex].value">
<option value="#FFFFFF" selected>Warna Background
<option value="#FF0000">Merah
<option value="#FFFF00">Kuning
<option value="#0099FF">Biru
<option value="#00CC00">Hijau
<option value="#CC9900">Coklat
<option value="#FF66FF">Pink
<option value="#000000">Hitam
</select>
</form>
<option value="#KODEWARNA">NAMA WARNA
Meletakannya diatas/sebelum kode </select>. Script dan kode alternatif lainnya yang dapat digunakan.
<form>
<select Size=1 name=clr onChange="document.bgColor=this.options[this.selectedIndex].value">
<option value="#CDAB7D" selected>What your color
<option value="aquamarine">aquamarine
<option value="blue">blue
<option value="cadetblue">cadet blue
<option value="chocolate">chocolate
<option value="darkred">dark red
<option value="darkkhaki">dark khaki
<option value="darkgoldenrod">dark goldenrod
<option value="darkslateblue">dark slate
<option value="deeppink">deep pink
<option value="darksalmon">dark salmon
<option value="gold">gold
<option value="hotpink">hotpink
<option value="lime">lime
<option value="red">red
<option value="salmon">salmon
<option value="springgreen">springgreen
<option value="tan">tan
<option value="tomato">tomato
<option value="turquoise">turquoise
<option value="wheat">wheat
<option value="yellow">yellow
</select>
</form>
<select Size=1 name=clr onChange="document.bgColor=this.options[this.selectedIndex].value">
<option value="#CDAB7D" selected>What your color
<option value="aquamarine">aquamarine
<option value="blue">blue
<option value="cadetblue">cadet blue
<option value="chocolate">chocolate
<option value="darkred">dark red
<option value="darkkhaki">dark khaki
<option value="darkgoldenrod">dark goldenrod
<option value="darkslateblue">dark slate
<option value="deeppink">deep pink
<option value="darksalmon">dark salmon
<option value="gold">gold
<option value="hotpink">hotpink
<option value="lime">lime
<option value="red">red
<option value="salmon">salmon
<option value="springgreen">springgreen
<option value="tan">tan
<option value="tomato">tomato
<option value="turquoise">turquoise
<option value="wheat">wheat
<option value="yellow">yellow
</select>
</form>
<script language="javascript">function test(form){if(form.text.value=="")
alert("What\'s your favorite color?")
else{document.bgColor=(""+form.text.value+"");}}</script>
<form>
<input type="text" name="text" style="background-color:#99f" size="17" /> <input type="button" name="button" value="Your's color!" onclick="test(this.form)" style="background-color:#09f" />
</form>
alert("What\'s your favorite color?")
else{document.bgColor=(""+form.text.value+"");}}</script>
<form>
<input type="text" name="text" style="background-color:#99f" size="17" /> <input type="button" name="button" value="Your's color!" onclick="test(this.form)" style="background-color:#09f" />
</form>
<script type='text/javascript'>
lck=0;function b(hval)
{if(lck==0)
{document.bgColor=hval;document.f.c.value=hval;}}
function l()
{if(lck==0)
{lck=1;}
else
{lck=0;}}
</script>
<table border="0" bgcolor="#000000" cellpadding="1" cellspacing="2" align="center"><tr><td bgcolor="#FF0000"><a href="JavaScript:l()" onMouseOver="b('#FF0000'); return true"> </a></td><td bgcolor="#FFFF00"><a href="JavaScript:l()" onMouseOver="b('#FFFF00'); return true"> </a></td><td bgcolor="#0000FF"><a href="JavaScript:l()" onMouseOver="b('#0000FF'); return true"> </a></td><td bgcolor="#33FF00"><a href="JavaScript:l()" onMouseOver="b('#33FF00'); return true"> </a></td><td bgcolor="#FF00FF"><a href="JavaScript:l()" onMouseOver="b('#FF00FF'); return true"> </a></td></tr></table>
Script baru...huhehihihilck=0;function b(hval)
{if(lck==0)
{document.bgColor=hval;document.f.c.value=hval;}}
function l()
{if(lck==0)
{lck=1;}
else
{lck=0;}}
</script>
<table border="0" bgcolor="#000000" cellpadding="1" cellspacing="2" align="center"><tr><td bgcolor="#FF0000"><a href="JavaScript:l()" onMouseOver="b('#FF0000'); return true"> </a></td><td bgcolor="#FFFF00"><a href="JavaScript:l()" onMouseOver="b('#FFFF00'); return true"> </a></td><td bgcolor="#0000FF"><a href="JavaScript:l()" onMouseOver="b('#0000FF'); return true"> </a></td><td bgcolor="#33FF00"><a href="JavaScript:l()" onMouseOver="b('#33FF00'); return true"> </a></td><td bgcolor="#FF00FF"><a href="JavaScript:l()" onMouseOver="b('#FF00FF'); return true"> </a></td></tr></table>
<input type="button" value="Change Color Background" onclick="changeC()" />
<script language="javascript">
var type = ["#CCB374","#B99F79","#DAC69A","#F3ECCC","#CBA564"];
function changeC(){
colors = Math.floor(Math.random() * 5);
document.body.style.backgroundColor = type[colors];
}
</script>
<script language="javascript">
var type = ["#CCB374","#B99F79","#DAC69A","#F3ECCC","#CBA564"];
function changeC(){
colors = Math.floor(Math.random() * 5);
document.body.style.backgroundColor = type[colors];
}
</script>
Simple JavaScript Changes Background
<a href="javascript:void(0);" onclick="document.body.style.background = '#343F4A url(http://your-link-image.jpg) repeat scroll 0 0';">scroll</a>
<a href="javascript:void(0);" onclick="document.body.style.background = '#343F4A url(http://your-link-image.jpg) repeat fixed 0 0';">fixed</a>
<a href="javascript:void(0);" onclick="document.body.style.background = '#999999';">Netral</a>
Nah silahkan berkreasi dan semoga berhasil ya ^_^'
Loading... |
2 comments
DO NOT EVEN TRY ADD LINK [-X
You can use some HTML tags, such as
<b> - <i> - <a> - http://...jpg/gif/png/bmp - http://youtu.be/...