![]() |
Glossy.js 1.5 allows you to add corners and shading and shadow to images on your webpages (alternatively: corner.js). 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 "glossy.js" and include it into your webpage.
<script type="text/javascript" src="glossy.js"></script>
To make it glossy just add a class="glossy" to the image (minimum dimension: 16x16).
If you want flexibility, use "cvi_glossy_lib.js" instead of "glossy.js". You can make your images respond to user actions (e.g. changing one or more options when the image is hovered over).
cvi_glossy.defaultRadius = 25; //INT 20-50 (%)
cvi_glossy.defaultColor = 0; //STR '#000000'-'#ffffff' or 0
cvi_glossy.defaultColor2 = 0; //STR '#000000'-'#ffffff' or 0
cvi_glossy.defaultGradient = 'v'; //STR 'd|h|v'-'diagonally|horizontal|vertical'
cvi_glossy.defaultShade = 50; //INT 0-100 (% opacity)
cvi_glossy.defaultShadow = 40; //INT 0-100 (% opacity)
cvi_glossy.defaultNoshadow = false; //BOOLEAN
cvi_glossy.defaultNoradius = false; //BOOLEAN
cvi_glossy.add(image, options);
cvi_glossy.add(document.getElementById("myimg"), { shadow: 75, shade: 20 });
cvi_glossy.modify(image, options);
cvi_glossy.modify(document.getElementById("myimg"), { radius: 24 });
cvi_glossy.remove(image);
Shows some of the things "glossy.js" does.
6 images with class = "glossy iradius50"
Empty gif with class = "glossy ibgcolor00aa00 igradient00aaaa horizontal noshadow"
3 images with class = "glossy"
In older browsers, the script degrades and your visitors won't notice a thing.
Opera do not support printing of canvas.
Glossy.js is distributed under this LICENSE. License permits free of charge use on non-commercial and private web sites only.
There is also a Commercial Software License available.
Images used are copyrighted and are used for demonstration only.
cvi.netzgesta.de also visit CVI-lab, S5 Reloaded and AJAX-FilmDB