grid-image-001.html (1097B)
1 <!doctype html> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <title>Example of rule image properties</title> 7 8 <style> 9 html,body { 10 color:black; background-color:white; font:20px/1 monospace; 11 } 12 13 .grid { 14 display: inline-grid; 15 grid-template-columns: repeat(3, 50px); 16 gap: 16px; 17 width: 300px; 18 height: 240px; 19 place-content: space-around; 20 21 column-rule: 16px solid blue; 22 column-rule-image: url(v-diagonal-blue-16.png) 16 space; 23 column-rule-extent: segment; 24 column-rule-align: rule-center; 25 column-rule-longitudinal-inset: -8px; 26 27 row-rule: 16px solid purple; 28 row-rule-image: url(h-diagonal-blue-16.png) 16 space; 29 row-rule-extent: segment; 30 row-rule-align: rule-center; 31 row-rule-longitudinal-inset: -8px; 32 33 border: 2px solid; 34 margin-right: 15px; 35 margin-bottom: 30px; 36 background: lightgrey; 37 } 38 39 x { 40 block-size: 48px; 41 background: grey; 42 } 43 x:nth-child(2), x:nth-child(6) { 44 grid-column: span 2; 45 } 46 47 </style> 48 49 <div class="grid test1"><x>1</x><x>2</x><x>3</x><x>4</x><x>5</x><x>6</x><x>7</x></div>