clipPath-on-outflowElement-01a.html 886 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <!DOCTYPE html>
  2. <html>
  3. <style type="text/css">
  4. #outer {
  5. width: 100px;
  6. height: 100px;
  7. overflow: hidden;
  8. }
  9. #clipped {
  10. clip-path: url(#myClip);
  11. width: 200px;
  12. height: 200px;
  13. }
  14. #absolutePosition {
  15. position: absolute;
  16. top: 0;
  17. left: 0;
  18. width: 400px;
  19. height: 400px;
  20. background-color: blue;
  21. }
  22. </style>
  23. <body style="margin: 0px;">
  24. <div id="outer">
  25. <div id="clipped">
  26. <div id="absolutePosition">
  27. <!-- This should only be clipped by the clip-path, not by the 100x100
  28. overflow:hidden clip. -->
  29. </div>
  30. </div>
  31. </div>
  32. <svg height="0">
  33. <defs>
  34. <clipPath id="myClip">
  35. <rect x="0" y="0" width="100" height="100"/>
  36. <rect x="100" y="100" width="100" height="100"/>
  37. <rect x="200" y="200" width="100" height="100"/>
  38. </clipPath>
  39. </defs>
  40. </svg>
  41. </body>
  42. </html>