Use Maskew to Skew the Shapes of Elements

Maskew, created by by Dan Motzenbecker, is a JS library that skews the shapes of elements without distorting their contents. It is mobile friendly as well. There is no dependencies but a modern browser is a requirement. It is less than 5k in size. Maskew is released under MIT License. You can download it via Guthub for free.

Optionally there is a jQuery plugin for Maskew too.

maskew

Use it:

var maskew = new Maskew(document.getElementById(‘skew-me’), angle);

With jQuery:

var $maskew = $(‘#skew-me’).maskew(angle);

Skew it:

maskew.skew(9);

// or with jQuery:

$maskew.maskew(‘skew’, 20);

// or:

$maskew.maskew().skew(20);

Demo: http://oxism.com/maskew/

Leave a Reply

Your email address will not be published. Required fields are marked *