UNPKG

malebranche

Version:

Converts clip path coordinates from absolute to fractional units between 0 and 1.

32 lines (30 loc) 576 B
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> <style> #foo { width : 800px; height : 600px; background : red; -webkit-clip-path : url(#svgPath); clip-path : url(#svgPath); } </style> </head> <body> <svg height="0" width="0"> <defs> <clipPath id="svgPath"> <path fill="none" stroke="#f7c562" stroke-width="1" d="M24 130L400 100 100 300z" /> </clipPath> </defs> </svg> <div id='foo'></div> <a href='object-bounding-box.html'>clip path example with object bounding box space</a> </body> </html>