background-image-column-collapsed-ref.html (970B)
1 <!doctype html> 2 <style> 3 body { 4 --peek: LightGreen; 5 } 6 .bg { 7 background-color: var(--peek); 8 background-image: linear-gradient(90deg, orange 0px, orange 10px, gainsboro 3px, gainsboro 25%, rgba(160,160,160,0.5) 25%, rgba(160,160,160,0.5) 50%, silver 50%, silver 75%, darkgray 75%, darkgray 170px, blue 170px); 9 background-repeat: no-repeat; 10 background-size: 50px 200px; 11 } 12 main * { 13 box-sizing: border-box; 14 } 15 .td { 16 width: 50px; 17 height: 50px; 18 position:absolute; 19 } 20 </style> 21 22 <main> 23 <div style="position: relative;border: 10px solid transparent; width:210px; height: 210px"> 24 <div class="td bg" style="top:-5px;left:-5px;height:200px"></div> 25 <div class="td bg" style="top:-5px;left:45px;height:200px"></div> 26 <div class="td" style="background:var(--peek); height:100px; left:95px;top:45px"></div> 27 <div class="td bg" style="top:-5px;left:145px;height:200px;width:100px;background-size: 100px 200px"></div> 28 </div> 29 30 </main>