Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript how to move first css background image with javascript

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #268232
    sobhan konari
    Participant

    hi , guys
    i have element with to background and i want to move first of thoes backgrounds


    background: url(car.png) no-repeat 20px 180px, //i want to change 20px with javascript url(road2.jpg) repeat-x;

    thanks

    #268237
    Beverleyh
    Participant

    Probably easiest to add a class to the element with JavaScript, and then define different background values against that class in the stylesheet.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.