14 lines
440 B
XML
14 lines
440 B
XML
<svg xmlns="http://www.w3.org/2000/svg" clip-path="url(#clip1)">
|
|
<clipPath id="clip2">
|
|
<rect x="25" y="25" width="150" height="150"/>
|
|
</clipPath>
|
|
<clipPath id="clip1">
|
|
<rect x="50" y="50" width="100" height="100"/>
|
|
</clipPath>
|
|
<rect width="200" height="200" fill="green"/>
|
|
<script>
|
|
var svg = document.documentElement;
|
|
svg.setAttribute('clip-path','url(#clip2)');
|
|
</script>
|
|
</svg>
|