Curl.js 1.2 allows you to add individual curls (inc. backside mask) to images on your webpages. It uses unobtrusive javascript to keep your code clean. It works in all the major browsers - Mozilla Firefox 1.5+, Opera 9+, Safari and IE6+. On older browsers, it'll degrade and your visitors won't notice a thing. CVI-lab: Get a fast impression of the effects and their illustration qualities. |
Download "curl.js" and include it into your webpage.
<script type="text/javascript" src="curl.js"></script>
To get the page curl effect just add a class="curl" to the image.
Shows some of the things "curl.js" does.
First Image with class = "curl invert", others with class = "curl isizeN" (different sizes)...
If you want flexibility, use "cvi_curl_lib.js" instead of "curl.js". You can make your curls respond to user actions (e.g. changing the curl size when the image is hovered over).
cvi_curl.add(image, options);
cvi_curl.add(document.getElementById("myimg"), { shadow: 75, color: 0 });
cvi_curl.modify(document.getElementById("myimg"), { size: 50 });
cvi_curl.modify(image, options);
cvi_curl.remove(image);
cvi_curl.defaultSize = size;
cvi_curl.defaultShadow = shadow;
cvi_curl.defaultColor = color;
cvi_curl.defaultInvert = boolean;
Changes the default size and shadow and color. The default value for size is 33 and for shadow 66. The default value for color is 0. The default value for invert is false.
In older browsers, the script degrades and your visitors won't notice a thing.
Curl.js is distributed under this LICENSE. License permits free of charge use on non-commercial and private web sites only. There are also Commercial Software Licenses available.
Images used are copyrighted and are used for demonstration only.
cvi.netzgesta.de also visit CVI-lab, S5 Reloaded and AJAX-FilmDB