Bevel.js 1.2 allows you to add bevels (and also shading, shining and glowing) to images on your webpages (alternatively: glossy.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.
Setting Up
Download "bevel.js" and include it into your webpage.
To make it bevel just add a class="bevel" to the image.
Classes
Initialisation class "bevel"
vary the radius by adding iradius followed by the desired radius in percent:
Image radius class "iradius20" - min=20 max=40 default=20
vary the masking by adding usemask:
Image masking class "usemask"
vary the masking by adding ibackcol followed by the color:
Mask color class "ibackcol" - min=000000 max=ffffff default=0080ff
vary the masking by adding ifillcol followed by the color:
Mask color class "ifillcol" - min=000000 max=ffffff default=ibackcol
vary the glowing by adding noglow:
Image glowing class "noglow"
vary the glowing by adding iglowopac followed by the desired opacity in percent:
Glow opacity class "iglowopac" - min=1 max=100 default=33
vary the glowcolor by adding iglowcol followed by the color:
Glow color class "iglowcol" - min=000000 max=ffffff default=000000
vary the shining by adding noshine:
Image shining class "noshine"
vary the shining by adding ishineopac followed by the desired opacity in percent:
Shine opacity class "ishineopac" - min=1 max=100 default=40
vary the shinecolor by adding ishinecol followed by the color:
Shine color class "ishinecol" - min=000000 max=ffffff default=ffffff
vary the shading by adding noshade:
Image shading class "noshade"
vary the shading by adding ishadeopac followed by the desired opacity in percent:
Shade opacity class "ishadeopac" - min=1 max=100 default=50
vary the shading by adding islinear:
Shade gradient class "islinear"
vary the shadecolor by adding ishadecol followed by the color:
Shade color class "ishadecol" - min=000000 max=ffffff default=000000
Scripting
If you want flexibility, use "cvi_bevel_lib.js" instead of "bevel.js".
You can make your images respond to user actions (e.g. changing one or more options when the image is hovered over).
Fast and easy to implement. Just add class="bevel" to the image and your good to go.
Don't need to spend time in an image editor creating images with effects.
Works really well with forum avatars. Doesn't require additional server work.
It's dead easy to change the attributes of the images.
Free of charge use on non-commercial and private web sites.
In older browsers, the script degrades and your visitors won't notice a thing.
History
Version 1.2
FF rendering bug removed
Version 1.1
IE rendering bug removed
Version 1.0
Initial Release
License
Bevel.js is distributed under this LICENSE. License permits free of charge use on non-commercial and private web sites only under special conditions (as described in the license). This license equals neither "open source" nor "public domain". There are also Commercial Software Licenses available.
YOU AGREE TO ALL CONDITIONS OF THIS LICENCE AGREEMENT CONCERNING THE USE OF THE SOFTWARE BY ACCEPTING THIS LICENCE.
IF YOU DO NOT AGREE TO ALL CONDITIONS OF THIS AGREEMENT, YOU SHALL NOT INSTALL THE SOFTWARE, OR USE IT IN OTHER WAYS.
Images used are copyrighted and are used for demonstration only.