Guest User

Untitled

a guest
Sep 30th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. document.div.style.background = 'url(second_1.jpg) no-repeat';
  2.  
  3. function new_art() {
  4. document.div.style.background = 'url(second_1.jpg)';
  5. }
  6.  
  7. div {
  8. background: url(first_1.jpg) no-repeat;
  9. width: 15%;
  10. height: 87%;
  11. }
  12. div:hover {
  13. background: url(first_2.jpg);
  14. }
  15.  
  16. <div></div>
  17. <input type="button" value="Tap me!" onclick="new_art()">
Add Comment
Please, Sign In to add comment