|
Reflex.js 1.2 allows you to add a Cover Flow™ effect (including reflection) to images on your webpages. *Cover Flow is a trademark of Apple Inc.. 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 "reflex.js" and include it into your webpage.
<script type="text/javascript" src="reflex.js"></script>
To get the effect just add a class="reflex" to the image (minimum dimension: 32x32).
The needed vertical space of the canvas element will grow by the height of the reflection, plus the height of the distance.
If you want flexibility, use "cvi_reflex_lib.js" instead of "reflex.js". You can make your images respond to user actions (e.g. changing one or more options when the image is hovered over).
cvi_reflex.defaultTilt = 'none'; //STR 'n|l|r'-'none|left|right'
cvi_reflex.defaultHeight = 33; //INT 10-100 (%)
cvi_reflex.defaultDistance = 0; //INT 0-100 (px)
cvi_reflex.defaultTransparency = 50; //INT 1-100 (%)
cvi_reflex.defaultBorder = 0; //INT 0-20 (px)
cvi_reflex.defaultColor = '#ffffff'; //STR '#000000'-'#ffffff'
cvi_reflex.defaultBoxmode = false; //BOOLEAN
cvi_reflex.add(image, options);
cvi_reflex.add(document.getElementById("myimg"), { height: 25, distance: 10 });
cvi_reflex.modify(image, options);
cvi_reflex.modify(document.getElementById("myimg"), { tilt: "left" });
cvi_reflex.remove(image);
Shows some of the things "reflex.js" does.
First 3 images with class "reflex" only, last 3 with "idistance?? iheight?? iopacity?? iborder? icolor??????" ...
Images used are copyrighted and are used for demonstration only.
In older browsers, the script degrades and your visitors won't notice a thing.
Opera do not support printing of canvas.
The inspiration for the script came from apples Cover Flow™.
Reflex.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