FANDOM


<<<< Back To T-Codes

These different Background Effects will enhance your website and give it a new life each time the clock changes, or give it a fresh gradient pattern, fixed images, background colours, change the background image each time you refresh & shake page on entry! These are all JavaScript Codes which can be added into Blogger if you add a Widget to the sidebar and then add the HTML/JavaScript Widget.

Gradient Background #1

<style>body {background:#FFFFFF; filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=1,StartColorStr=#FFFFFF,EndColorStr=#FF66CC); }</style>

Gradient Background #2

<style>body {background:#ffffff; filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#392A47,EndColorStr=#D1B4D2); }</style>

Fixed Background

<body background="IMAGEURLHERE" bgproperties="fixed"></body>

Shake Page On Entry

<head> <script LANGUAGE="JavaScript"> <!-- This script and many more are available free online at --> <!-- Warren Woodhouse http://www.warrenwoodhouse.webs.com --> <!-- Original: Warren Woodhouse (www.warrenwoodhouse.webs.com ) --> <!-- Web Site: http://www.warrenwoodhouse.webs.com --> <!-- Begin for (t = 2; t > 0; t--) { for (x = 20; x > 0; x--) { for (y = 10; y > 0; y--) { parent.moveBy(0,-x); } } for (x = 20; x > 0; x--) { for (y = 10; y > 0; y--) { parent.moveBy(0,x); } } for (x = 20; x > 0; x--) { for (y = 10; y > 0; y--) { parent.moveBy(x,0); } } for (x = 20; x > 0; x--) { for (y = 10; y > 0; y--) { parent.moveBy(-x,0); } } } //--> // End --> </script></HEAD>

Background Colour/Color

<style> body { background-color: #COLORHERE; } </style>

Change Background Image Each Time You Refresh The Page

<script> /*Random Background Image- By Warren Woodhouse (www.warrenwoodhouse.webs.com) More free JavaScripts here! */ var backgr1="../clip/backgr4.jpg" var backgr2="../clip/backgr17.jpg" var backgr3="../clip/backgr13.jpg" var cur=Math.round(6*Math.random()) if (cur<=1) backgr=backgr1 else if (cur<=4) backgr=backgr2 else backgr=backgr3 document.write('<body background="'+backgr+'" bgcolor="#FFFFFF">') </script></body></script></script></script> </script></script></script></script></script></script> </script>

Different Backgrounds At Certain Times Of The Day

<script language="JavaScript"> <!-- Hide From Old Browsers /* ?2010-2016 JavaScript written by Warren Woodhouse @ http://www.warrenwoodhouse.webs.com --- This simple script changes the background image four times a day -- It can be altered to include other page attributes such as text colours and individual page items such as on the example page - Use freely but keep this entire credit line intact. */ day=new Date() //..get the date x=day.getHours() //..get the hour if(x>=0 && x<4) { document.write('<body background="put your first image file name here such as 1.jpg">') } else if(x>=4 && x<12) { document.write('<body background="put your second image file name here such as 2.jpg">') } else if(x>=12 && x<18) { document.write('<body background="put your third image file name here such as 3.jpg">') } else if (x>=18 && x<24) { document.write('<body background="put your last image file name here such as 4.jpg">') } <!-- End Hiding --> </script>

Community content is available under CC-BY-SA unless otherwise noted.