Advertisement
Banmere

Untitled

Mar 25th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.76 KB | None | 0 0
  1. <html>
  2. <head>
  3.  
  4. <style>
  5.  
  6. .container {
  7. display: flex;
  8. background-image: linear-gradient(to bottom right, #200020, purple);
  9. min-height: 50px;
  10. }
  11.  
  12. .container > * {
  13. background-image: linear-gradient(to bottom right, yellow, orange);
  14. margin: 10px 0;
  15. }
  16.  
  17. .gridcontainer {
  18. display: grid;
  19. grid-template-columns: 100px repeat(2, 200px) auto 200px;
  20. grid-template-rows: repeat(4, 100px);
  21. grid-gap: 5px;
  22. }
  23.  
  24. .gridcontainer div {
  25. background-image: linear-gradient(to bottom right, #D22, #422);
  26. }
  27.  
  28. </style>
  29.  
  30. </head>
  31. <body>
  32.  
  33. <div class="cssgrid">
  34.  
  35. <div class="gridcontainer">
  36. <div>Cell Content</div>
  37. <div>Cell Content</div>
  38. <div>Cell Content</div>
  39. <div>Cell Content</div>
  40. <div>Cell Content</div>
  41. <div>Cell Content</div>
  42. <div>Cell Content</div>
  43. <div>Cell Content</div>
  44. <div>Cell Content</div>
  45. <div>Cell Content</div>
  46. <div>Cell Content</div>
  47. <div>Cell Content</div>
  48. <div>Cell Content</div>
  49. <div>Cell Content</div>
  50. <div>Cell Content</div>
  51. </div>
  52.  
  53. </div>
  54.  
  55.  
  56.  
  57.  
  58. <div class="flexboxstuff">
  59. <label>basic flex</label>
  60. <div class="container">
  61. <div>Item 1</div>
  62. <div>Here is an item 2</div>
  63. <div>Item 3</div>
  64. </div>
  65.  
  66. <label>even fill</label>
  67. <div class="container">
  68. <div style="flex: 1 100%">Item 1</div>
  69. <div style="flex: 1 100%">Here is an item 2</div>
  70. <div style="flex: 1 100%">Item 3</div>
  71. </div>
  72.  
  73. <label>ordered</label>
  74. <div class="container">
  75. <div style="order:3">Item 1</div>
  76. <div style="order:1">Here is an item 2</div>
  77. <div style="order:2">Item 3</div>
  78. </div>
  79.  
  80. <label>direction right</label>
  81. <div class="container" style="flex-direction: row-reverse;">
  82. <div>Item 1</div>
  83. <div>Here is an item 2</div>
  84. <div>Item 3</div>
  85. </div>
  86.  
  87. <label>direction down</label>
  88. <div class="container" style="flex-direction: column;">
  89. <div>Item 1</div>
  90. <div>Here is an item 2</div>
  91. <div>Item 3</div>
  92. </div>
  93.  
  94. <label>direction up</label>
  95. <div class="container" style="flex-direction: column-reverse;">
  96. <div>Item 1</div>
  97. <div>Here is an item 2</div>
  98. <div>Item 3</div>
  99. </div>
  100.  
  101. <label>grow</label>
  102. <div class="container">
  103. <div>Item 1</div>
  104. <div style="flex-grow: 10">Here is an item 2</div>
  105. <div>Item 3</div>
  106. </div>
  107.  
  108. <label>wrap</label>
  109. <div class="container" style="flex-wrap: wrap;">
  110. <div style="width:800px;">Item 1</div>
  111. <div style="width:800px;">Here is an item 2</div>
  112. <div style="width:800px;">Item 3</div>
  113. </div>
  114.  
  115. <label>center justify</label>
  116. <div class="container" style="justify-content: center;">
  117. <div>Item 1</div>
  118. <div>Here is an item 2</div>
  119. <div>Item 3</div>
  120. </div>
  121.  
  122. <label>space-between</label>
  123. <div class="container" style="justify-content: space-between;">
  124. <div>Item 1</div>
  125. <div>Here is an item 2</div>
  126. <div>Item 3</div>
  127. </div>
  128.  
  129. <label>space-around</label>
  130. <div class="container" style="justify-content: space-around;">
  131. <div>Item 1</div>
  132. <div>Here is an item 2</div>
  133. <div>Item 3</div>
  134. </div>
  135.  
  136. <label>space-evenly</label>
  137. <div class="container" style="justify-content: space-evenly;">
  138. <div>Item 1</div>
  139. <div>Here is an item 2</div>
  140. <div>Item 3</div>
  141. </div>
  142.  
  143. <label>align start</label>
  144. <div class="container" style="align-items: flex-start;">
  145. <div style="min-height: 50px;">Item 1</div>
  146. <div style="min-height: 150px;">Here is an item 2</div>
  147. <div style="min-height: 75px;">Item 3</div>
  148. </div>
  149.  
  150. <label>align end</label>
  151. <div class="container" style="align-items: flex-end;">
  152. <div style="min-height: 50px;">Item 1</div>
  153. <div style="min-height: 150px;">Here is an item 2</div>
  154. <div style="min-height: 75px;">Item 3</div>
  155. </div>
  156.  
  157. <label>align stretch</label>
  158. <div class="container" style="align-items: stretch;">
  159. <div style="min-height: 50px;">Item 1</div>
  160. <div style="min-height: 150px;">Here is an item 2</div>
  161. <div style="min-height: 75px;">Item 3</div>
  162. </div>
  163.  
  164. <label>align center</label>
  165. <div class="container" style="align-items: center;">
  166. <div style="min-height: 50px;">Item 1</div>
  167. <div style="min-height: 150px;">Here is an item 2</div>
  168. <div style="min-height: 75px;">Item 3</div>
  169. </div>
  170.  
  171. <label>align baseline</label>
  172. <div class="container" style="align-items: baseline;">
  173. <div style="min-height: 50px; padding-top: 20px;">Item 1</div>
  174. <div style="min-height: 150px;">Here is an item 2</div>
  175. <div style="min-height: 75px;">Item 3</div>
  176. </div>
  177.  
  178. <label>align self</label>
  179. <div class="container">
  180. <div style="min-height: 150px;">big boy</div>
  181. <div style="min-height: 50px; align-self: auto;">auto</div>
  182. <div style="min-height: 50px; align-self: flex-start;">flex-start</div>
  183. <div style="min-height: 75px; align-self: flex-end;">flex-end</div>
  184. <div style="min-height: 50px; align-self: center;">centered</div>
  185. <div style="min-height: 75px; align-self: stretch;">stretch</div>
  186. </div>
  187.  
  188. </div>
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195. </body>
  196.  
  197. </script>
  198. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement