[TYPO3] background image

Surajit surajit at srijan.in
Tue Feb 14 06:52:16 CET 2006


Hi,

Add the above code in the <head> section of your page :

<style>
body{
/*Remove below line to make bgimage NOT fixed*/
background-attachment:fixed;
background-repeat: no-repeat;
/*Use center center in place of 300 200 to center bg image*/
background-position: 300 200;
}
</style>

<script language="JavaScript1.2">

//Specify background images to slide
var bgslides=new Array()
bgslides[0]="bgslide.jpg"
bgslides[1]="bgslide2.jpg"
bgslides[2]="bgslide3.jpg"

//Specify interval between slide (in miliseconds)
var speed=3000

//preload images
var processed=new Array()
for (i=0;i<bgslides.length;i++){
processed[i]=new Image()
processed[i].src=bgslides[i]
}

var inc=-1

function slideback(){
if (inc<bgslides.length-1)
inc++
else
inc=0
document.body.background=processed[inc].src
}

if (document.all||document.getElementById)
window.onload=new Function('setInterval("slideback()",speed)')

</script>

The above code is a simple javascript which can dynamically rotate 
images in background.

Thanks and regards,
Surajit
Srijan Technologies, India.



m.heidari at armanpaya.com wrote:

>Hello,
>
>I look for your help to add a dynamic background image to my site( i can add
>dynamic image). Please if it is possible; direct me to find a way to solve this
>problem .
>
>Thanks.
>
>
>
>_______________________________________________
>TYPO3-english mailing list
>TYPO3-english at lists.netfielders.de
>http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
>  
>




More information about the TYPO3-english mailing list