1

I think the best way to do this would be css or javascript. Also im not even really sure it is possible.

all the css i have

html {
    background: url(http://i.imgur.com/6oqXuwz.jpg) no-repeat center center fixed;
    background-size: cover;
}


/* unvisited link */
a:link {

}

/* visited link */
a:visited {

}

/* mouse over link */
a:hover {

}

/* selected link */
a:active {

}
Ben Casalino
  • 2,262
  • 5
  • 20
  • 28
  • Can you post your HTML or CSS? It seems what you want could be easily done with JavaScript/jQuery – Ben Kolya Mansley Aug 31 '15 at 02:19
  • 1
    There is no *other* way than JavaScript or CSS. :) But your question is very vague, on par with "can doctors cure me if I am ill?" You will want to provide more detail, hopefully a snippet of relevant HTML/CSS and the precise description of what you wanted to happen. – Amadan Aug 31 '15 at 02:21
  • it might help: http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onmouseover – Dyrandz Famador Aug 31 '15 at 02:21
  • i have it all very basic in css right now with a background img linked to the body css class and the four basic link/hover/visted/active classes as well. what other code do you need? thanks again! – Ben Casalino Aug 31 '15 at 02:25
  • Can you make a Fiddle(http://jsfiddle.net)? – HeiN Aug 31 '15 at 02:25

2 Answers2

0
<script> 
jQuery('#link').hover(function() 
{ 
jQuery('body').css("background-image", "url('foo/bar.png')");
}); 
</script>

You could try the above, where # being the ID you can change to a . to use a class. You can also use this to change elements of a div by changing body to again #foo or .foo depending on whether you're using a class or ID. Hope this helps.

0

Use jQuery .hover()

$('a').hover(function() {
    $('html').css('background',
    'url(http://i.imgur.com/PsYD2yN.jpg) no-repeat center center fixed')
});
HeiN
  • 503
  • 3
  • 17