|
16 | 16 | .a { |
17 | 17 | background: black; |
18 | 18 | color: white; |
| 19 | + padding: 0.5em 0.1em; |
19 | 20 | } |
20 | 21 | .b { |
21 | 22 | color: #aaa; |
| 23 | + padding: 0.5em 0.1em; |
22 | 24 | } |
23 | 25 | #canvasExample { |
24 | 26 | height: 5em; |
|
27 | 29 | display: block; |
28 | 30 | margin-bottom: 1em; |
29 | 31 | } |
| 32 | + .grid-wrapper { |
| 33 | + display: grid; |
| 34 | + grid-gap: 0.125em; |
| 35 | + grid-template-columns: repeat(auto-fill, minmax(200px, 1fr) ) ; |
| 36 | + background-color: #fff; |
| 37 | + color: #444; |
| 38 | + margin-bottom: 1em; |
| 39 | + page-break-inside: avoid; |
| 40 | + } |
| 41 | + .grid-wrapper .box { |
| 42 | + background-color: #444; |
| 43 | + color: #fff; |
| 44 | + border: 0.1em solid #444; |
| 45 | + border-radius: 5px; |
| 46 | + padding: 0.25em; |
| 47 | + font-size: 150%; |
| 48 | + } |
| 49 | + .grid-wrapper .a { |
| 50 | + grid-column: auto / span 2; |
| 51 | + } |
| 52 | + .grid-wrapper .k { |
| 53 | + grid-column: auto / span 3; |
| 54 | + } |
| 55 | + .grid-wrapper .g { |
| 56 | + grid-column: auto / span 2; |
| 57 | + grid-row: auto / span 2; |
| 58 | + } |
30 | 59 | </style> |
31 | 60 | <!--[if lt IE 9]> |
32 | 61 | <script src="js/vendor/html5-3.6-respond-1.1.0.min.js"></script> |
@@ -55,6 +84,22 @@ <h3>Element 2</h3> |
55 | 84 | </p> |
56 | 85 | Canvas: |
57 | 86 | <canvas id="canvasExample"></canvas> |
| 87 | + Grid: |
| 88 | + <div class="grid-wrapper"> |
| 89 | + <div class="box a">A</div> |
| 90 | + <div class="box b">B</div> |
| 91 | + <div class="box c">C</div> |
| 92 | + <div class="box d">D</div> |
| 93 | + <div class="box e">E</div> |
| 94 | + <div class="box f">F</div> |
| 95 | + <div class="box g">G</div> |
| 96 | + <div class="box h">H</div> |
| 97 | + <div class="box i">I</div> |
| 98 | + <div class="box j">J</div> |
| 99 | + <div class="box k">K</div> |
| 100 | + <div class="box l">L</div> |
| 101 | + <div class="box m">M</div> |
| 102 | + </div> |
58 | 103 | <button class="print-link no-print"> |
59 | 104 | Print this ($.print("#ele2")) and skip the button (.no-print) |
60 | 105 | </button> |
|
0 commit comments