Guest User

Untitled

a guest
Nov 19th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width">
  6. <title>Abstract Art</title>
  7. <style id="jsbin-css">
  8. .box-1 {
  9. background-color: red;
  10. height: 100px;
  11. width: 300px;
  12. }
  13.  
  14.  
  15. .box-2 {
  16. background-color: green;
  17. height: 400px;
  18. width: 750px;
  19. }
  20.  
  21. .box-3 {
  22. background-color: blue;
  23. height: 990px;
  24. width: 100px;
  25. }
  26. </style>
  27. </head>
  28. <body>
  29.  
  30. <script id="jsbin-javascript">
  31. //window.onload = function() {
  32.  
  33. for (i=1; i < 4; i++) {
  34. var boxElement = document.createElement('div');
  35. // boxElement.setAttribute('class','box-'+i)
  36. boxElement.className= 'box-'+i;
  37. boxElement.textContent = 'Placeholder text...'
  38. document.body.appendChild(boxElement);
  39. }
  40.  
  41. //};
  42. </script>
  43.  
  44.  
  45. <script id="jsbin-source-css" type="text/css">
  46. .box-1 {
  47. background-color: red;
  48. height: 100px;
  49. width: 300px;
  50. }
  51.  
  52.  
  53. .box-2 {
  54. background-color: green;
  55. height: 400px;
  56. width: 750px;
  57. }
  58.  
  59. .box-3 {
  60. background-color: blue;
  61. height: 990px;
  62. width: 100px;
  63. }
  64. </script>
  65.  
  66. <script id="jsbin-source-javascript" type="text/javascript">//window.onload = function() {
  67.  
  68. for (i=1; i < 4; i++) {
  69. var boxElement = document.createElement('div');
  70. // boxElement.setAttribute('class','box-'+i)
  71. boxElement.className= 'box-'+i;
  72. boxElement.textContent = 'Placeholder text...'
  73. document.body.appendChild(boxElement);
  74. }
  75.  
  76. //};</script></body>
  77. </html>
Add Comment
Please, Sign In to add comment