XUPWUP.NL
Login
Or create an account

Per kan dansen

0 Posted 20 Sep 2012
User avatar
marinus
Trustworthy
Posts: 962
Kijk maar:

1 Posted 24 September 2012 02:05
User avatar
00T00
Global Mod.
Posts: 1048
Ik snapte hem vanochtend niet en ik snap hem nu nog steeds niet
2 Posted 26 September 2012 13:35
User avatar
Kebabbi
Moderator
Posts: 549
  1. <script type="text/javascript">
  2. holder = document.createElement("div");
  3. mouth = document.createElement("div");
  4. mouth.style.width = "200px";
  5. mouth.style.height = "40px";
  6. mouth.style.border = "4px solid black";
  7. mouth.style.borderRadius = "10px";
  8. holder.style.width = "250px";
  9. holder.style.marginLeft = "auto";
  10. holder.style.marginRight = "auto";
  11. mouseHolder = document.createElement("div");
  12. mouseHolder2 = document.createElement("div");
  13. mouseHolder.style.display = "inline-block";
  14. mouseHolder2.style.display = "inline-block";
  15. eye = document.createElement("div");
  16. eye2 = document.createElement("div");
  17. mouseHolder.style.width = "100px";
  18. mouseHolder.style.height = "100px";
  19. mouseHolder.style.border = "1px solid black";
  20. mouseHolder.style.overflow = "hidden";
  21. mouseHolder2.style.width = "100px";
  22. mouseHolder2.style.height = "100px";
  23. mouseHolder2.style.border = "1px solid black";
  24. mouseHolder2.style.overflow = "hidden";
  25. mouseHolder.style.borderRadius = "50px 50px 0 0";
  26. eye.style.paddingLeft = "0px";
  27. eye2.style.paddingLeft = "0px";
  28. mouseHolder2.style.borderRadius = "50px 50px 0 0";
  29. mouseHolder.appendChild(eye);
  30. mouseHolder2.appendChild(eye2);
  31. eye.style.fontSize = "72pt";
  32. eye.innerHTML = "Ø";
  33. eye2.style.fontSize = "72pt";
  34. eye2.innerHTML = "Ø";
  35. document.body.appendChild(holder);
  36. holder.appendChild(mouseHolder);
  37. holder.appendChild(mouseHolder2);
  38. holder.appendChild(document.createElement("br"));
  39. mouth.style.backgroundColor = "pink";
  40. holder.appendChild(mouth);
  41. window.addEventListener(
  42. "mousemove",
  43. function(e){
  44. eye.style.marginLeft = (30 * e.clientX / document.body.offsetWidth)+"px";
  45. eye2.style.marginLeft = eye.style.marginLeft;
  46. },
  47. true
  48. );</script>
© Rick Hendricksen