Fire Dragon Posted February 4, 2006 Share Posted February 4, 2006 I find phong game code what can use freely in websites,and I wanted little change it's graphics,before I put it into my website.However,I really don't know anything about CSS(I think start it's learning after JS)so I need litle help modifying this code.Well,in game,ball is black square,and I want replace it to gif image.How it happens?Here is code: #ball { position: absolute; top: 160px; left: 210px; width: 7px; height: 7px; clip: rect(0px 7px 7px 0px); background-color: #555; z-index: 2; display: none;} I made quick look to w3schools' tutorial,but I didn't find anything. Link to comment Share on other sites More sharing options...
rappo Posted February 4, 2006 Share Posted February 4, 2006 Try this outDelete the following code: background-color: #555; and replace it with this: background: url([link to the gif you want to use]) no-repeat; Link to comment Share on other sites More sharing options...
Fire Dragon Posted February 4, 2006 Author Share Posted February 4, 2006 Try this outDelete the following code:background-color: #555; and replace it with this: background: url([link to the gif you want to use]) no-repeat; <{POST_SNAPBACK}> No...I can't get it work. Link to comment Share on other sites More sharing options...
aspnetguy Posted February 4, 2006 Share Posted February 4, 2006 were is the CSS file stored?? and where is the images stored...the path must be percise. Link to comment Share on other sites More sharing options...
Fire Dragon Posted February 5, 2006 Author Share Posted February 5, 2006 were is the CSS file stored?? and where is the images stored...the path must be percise.<{POST_SNAPBACK}> My image,and html document was in same folder.Original CSS code don't use images. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now