clip-path-polyfill

Clip path responsive cross-browser polyfill

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
clip-path-polyfill
1.0.05 years ago5 years agoMinified + gzip package size for clip-path-polyfill in KB

Readme

Clip-path responsive cross-browser polyfill

  • Support: IE 9+, Edge(12+), Chrome(4+), FF(3.6+), Safari(4+), Opera(10.1+),
  • Dependencies: JQuery
  • Replace img by canvas

DEMO:

https://stasglebov.github.io/Clip-path-polyfill/
How to use:
  • Generate figure you need using http://bennettfeely.com/clippy/ ( for example )
  • Include/import clip-path-polyfill.js file
  • Add data attribute to img:
<img src="img.jpeg" data-polyclip="0, 10%, 50%, 0, 75%, 75%, 0, 80%"> ! IMPORTANT ! You need separate every figure coordinate (x, y) by coma

Enjoy!