SHARE
TWEET

tavares

a guest Jan 26th, 2009 341 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-br">
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
  4. <script type="text/javascript">
  5. var pos = 0;
  6. function mover(el)
  7. {
  8. pos += 20;
  9. div_red = document.getElementById(el);
  10. div_red.style.left = pos + "px";
  11. }
  12. window.onload = function()
  13. {
  14. int = window.setInterval("mover('area1')", 500);
  15. }
  16. <style type="text/css">
  17. #area {
  18. width:4040px;
  19. z-index: 1;
  20. }
  21.  
  22. #area1{
  23. position:absolute;
  24. top: 0;
  25. width:10px;
  26. height:80px;
  27. background:red;
  28. z-index: 2;
  29. }
  30. </head>
  31. <div id="area">
  32. teste teste teste teste teste teste teste teste teste
  33. <div id="area1">
  34. </div>
  35. </div>
  36. </body>
  37. </html>
RAW Paste Data
Top