mask-repeat-3-svg.html (1140B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Masking: mask-repeat: repeated mask layer image, SVG content</title> 4 <link rel="help" href="https://www.w3.org/TR/css-masking-1/#the-mask-repeat"> 5 <link rel="match" href="mask-repeat-3-ref.html"> 6 <meta name="assert" content="Test checks whether repeated mask layer works correctly or not."> 7 <style type="text/css"> 8 rect.frame { 9 x: -0.5px; 10 y: -0.5px; 11 width: 151px; 12 height: 151px; 13 stroke: black; 14 fill: none; 15 } 16 17 rect.masked { 18 width: 150px; 19 height: 150px; 20 fill: purple; 21 mask-image: url(support/50x50-opaque-blue.svg); 22 mask-position: left top; 23 } 24 25 #round { 26 mask-repeat: round; 27 } 28 #round-x { 29 mask-repeat: round no-repeat; 30 } 31 #round-y { 32 mask-repeat: no-repeat round; 33 } 34 </style> 35 <svg height="456"> 36 <g transform="translate(1 1)"> 37 <rect class="masked" id="round"/> 38 <rect class="frame"/> 39 </g> 40 <g transform="translate(1 153)"> 41 <rect class="masked" id="round-x"/> 42 <rect class="frame"/> 43 </g> 44 <g transform="translate(1 305)"> 45 <rect class="masked" id="round-y"/> 46 <rect class="frame"/> 47 </g> 48 </svg>