parent-clip.svg 809 B

1234567891011121314151617
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 200 200" width="200" height="200">
  3. <defs>
  4. <clipPath id="circular">
  5. <circle cx="100" cy="100" r="100" />
  6. </clipPath>
  7. </defs>
  8. <circle cx="100" cy="100" r="100" />
  9. <rect x="100" y="100" width="100" height="100" fill="red" clip-path="url(#circular)" />
  10. <g clip-path="url(#circular)">
  11. <rect id="greensquare" x="100" y="100" width="100" height="100" fill="green">
  12. <animate id="dx" attributeName="x" from="100" to="100" dur="2s" values="100; 0; 100" repeatCount="indefinite" />
  13. <animate id="dy" attributeName="y" from="100" to="100" dur="2s" values="100; 0; 100" repeatCount="indefinite" />
  14. </rect>
  15. </g>
  16. </svg>