threejs-tips-html-background.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <!-- Licensed under a BSD license. See license.html for license -->
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
  7. <title>Three.js - HTML Background</title>
  8. <style>
  9. html {
  10. box-sizing: border-box;
  11. }
  12. *, *:before, *:after {
  13. box-sizing: inherit;
  14. }
  15. body {
  16. margin: 0;
  17. color: white;
  18. font-size: 20pt;
  19. }
  20. h1 {
  21. font-family: sans-serif;
  22. }
  23. #background {
  24. width: 100vw;
  25. height: 100vh;
  26. display: block;
  27. position: fixed;
  28. left: 0;
  29. top: 0;
  30. z-index: -1;
  31. pointer-events: none;
  32. border: none;
  33. }
  34. #content {
  35. padding: 1em;
  36. }
  37. #content>* {
  38. max-width: 700px;
  39. margin-left: auto;
  40. margin-right: auto;
  41. }
  42. a {
  43. color: lightblue;
  44. }
  45. a:visited {
  46. color: lightcoral;
  47. }
  48. a:hover {
  49. color: magenta;
  50. }
  51. </style>
  52. </head>
  53. <body>
  54. <iframe id="background" src="threejs-responsive.html"></iframe>
  55. <div id="content">
  56. <h1>Beautiful Cubes</h1>
  57. <p>
  58. <b>Cubes are beautiful</b>. You can have an entire planet of them, for instance.
  59. </p><p>
  60. How cool is that? (A bit confusing, honestly. I have always felt as though cubes had a tendency to be a little too cool and overly realistic. Like an endless collection of super-realistic robots… But I guess it is part of what makes them so interesting.)
  61. </p><p>
  62. So maybe there's a limit to what the human imagination can do for me.
  63. </p><p>
  64. That can't hurt.
  65. </p><p>
  66. Well then… let's break it down.
  67. </p><p>
  68. Stardust
  69. </p><p>
  70. I know a lot of you are saying: You can't, because you will get stuck with something that's "too realistic." Well, I have a very real suggestion: Just don't be that dude. In fact, let's be very specific: If you have to do something, let the actual thing change. If it's a little weird to have a space ship, or a spaceship you have to fly, or … well, you probably already are.
  71. </p><p>
  72. Forget about all of the sci-fi stuff. Space. No sense hiding that from me.
  73. </p><p>
  74. The space in my own home was never real-world. It was never something that a person might have done. It was something that only seemed plausible to me. There was only one "space craft," and if you could figure
  75. </p><p>
  76. <b>Cubes are beautiful</b>. Don't underestimate a nice stack of cubes.
  77. </p><p>
  78. If you decide to stack more than one cube, don't forget to use a stack of cubes as a guide to follow to make a tight fit. If a bunch of cubes are stacked too close together, the edges will stick out which will make for a tight fit!
  79. </p><p>
  80. Once again, if you decide you don't want to stack your boxes you can place another stack of cubes along the edge.
  81. </p><p>
  82. And you are done! The process is super simple and simple it's the easy stuff to set up.
  83. </p><p>
  84. But what if you don't like the size of the boxes?
  85. </p><p>
  86. You see, in the old days, a box was a solid block of wood, plastic or ceramic with an outer layer of cardboard.
  87. </p><p>
  88. In the 1990s, wood became the new material and in this method, the cardboard and wood are joined together so that they can both become a floor.
  89. </p><p>
  90. But some people don't like to use just the plastic/carpet layer. And with those people, these cubes are more likely to get wet.
  91. </p><p>
  92. So how does this stack?
  93. </p><p>
  94. From: <a href="https://talktotransformer.com/">Talk to Transformer</a>
  95. </p>
  96. </div>
  97. </div>
  98. </body>
  99. </html>