Log In · Register

 
how to add script, background!!
rosedoll
post Apr 17 2006, 02:32 PM
Post #1


Senior Member
***

Group: Member
Posts: 78
Joined: Apr 2006
Member No: 391,072



i have this script here:
<script language=javascript>
var pic=new Array(5)
pic[0]=""
pic[1]=""
pic[2]=""
pic[3]=""
pic[4]=""
pic[5]=""
pic[6]=""
pic[7]=""

var newdate=new Date()
var getpic=newdate.getSeconds()%pic.length
document.write('<STYLE>')
document.write('body{ background-image: url('+pic[getpic]+');')
document.write(' background-repeat: no-repeat; ')
document.write('background-attachment: fixed; ')
document.write('background-position: 50% 100% }')
document.write('</STYLE>')
</script>

Is to random your backgrounds right?``i want one or two of my background pics to repeat and stf`` what and where do i add the "background-repeat: repeat;" to?
thankyou for helping``
 
 
Start new topic
Replies
talcumpowder
post Apr 17 2006, 05:59 PM
Post #2


You'll find me in your dreams.
*******

Group: Official Member
Posts: 8,536
Joined: Mar 2005
Member No: 114,010



CODE
document.write(' background-repeat: no-repeat; ')
Just take out the no-. Seems easy when you think about it, right?
 
rosedoll
post Apr 17 2006, 07:32 PM
Post #3


Senior Member
***

Group: Member
Posts: 78
Joined: Apr 2006
Member No: 391,072



QUOTE(fishcake-y @ Apr 17 2006, 3:59 PM) *
CODE
document.write(' background-repeat: no-repeat; ')
Just take out the no-. Seems easy when you think about it, right?


i have this part though.... but then i want to put then in one or two of these ones here:

pic[0]=""
pic[1]=""
pic[2]=""
pic[3]=""
pic[4]=""

where do i add it?
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: