blob: 78b57628ff873f74bfb9367ff5c5df910fcd1bd9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:html="http://www.w3.org/1999/xhtml">
<g id="testmeta">
<title>CSS Masking: clipPath with CSS Transforms and 2nd content element</title>
<html:link rel="author" title="Dirk Schulze" href="mailto:dschulze@adobe.com"/>
<html:link rel="help" href="http://www.w3.org/TR/css-masking-1/#svg-clipping-paths"/>
<html:link rel="help" href="http://www.w3.org/TR/css-masking-1/#ClipPathElement"/>
<html:link rel="match" href="reference/clip-path-square-002-ref.svg" />
<metadata class="flags">svg</metadata>
<desc class="assert">CSS Transforms must apply on the clipPath
element. This example adds a second content element since that may
cause masking in some implementations. A green square should be
visible.</desc>
</g>
<clipPath id="clip1" style="transform: scale(10) translate(5px, 5px);">
<rect width="10" height="10"/>
<!-- Second rect may cause masking -->
<rect width="5" height="4"/>
</clipPath>
<rect width="200" height="200" fill="green" clip-path="url(#clip1)"/>
</svg>
|