mask-repeat-1-ref.html (1129B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Masking: mask-repeat: repeated mask layer image</title> 6 <link rel="author" title="Astley Chen" href="mailto:aschen@mozilla.com"> 7 <link rel="author" title="Mozilla" href="https://www.mozilla.org"> 8 <style type="text/css"> 9 div.outer { 10 width: 115px; 11 height: 115px; 12 position: relative; 13 border: 1px solid black; 14 } 15 16 .color { 17 background-color: purple; 18 } 19 20 #default { 21 position: absolute; 22 width: 50px; height: 50px; 23 } 24 25 #repeat-x { 26 position: absolute; 27 width: 100%; height: 50px; 28 } 29 30 #repeat-y { 31 position: absolute; 32 width: 50px; height: 100%; 33 } 34 </style> 35 </head> 36 <body> 37 <div class="outer color"></div> 38 <div class="outer"> 39 <div class="color" id="default"></div> 40 </div> 41 <div class="outer color"></div> 42 <div class="outer"> 43 <div class="color" id="repeat-x"></div> 44 </div> 45 <div class="outer"> 46 <div class="color" id="repeat-y"></div> 47 </div> 48 </body> 49 </html>