Why not show some reflection
Posted by info on 29th October 2008
With the aid of the tag CANVAS in not IE browsers and with the filter DXImageTransform possibility on IE Browsers you can add reflections (wetfloor effect) under your image just with a little bit javascript.
view the site http://cow.neondragon.net/stuff/reflection/ for the javascript
The trick is by unobtrusive javascript and just three classes on your image you add reflection.
- add class “reflect”
- add class “rheight##” where ## is the height in percentage for the gradient. default = 50
- add class “ropacity##” where ## is the amount of opacity. default = 50
- add the javascript “reflection.js” to the page
- call the function addReflection on window load.
example:
<head><script type=”text/javascript” src=”reflection.js”></script><script type=”text/javascript” >window.onload = addReflections</script></head><body><img src=”macosxlogo.gif” alt=”img” width=”73″ height=”97″ class=”reflect rheight97 ropacity50″ /></body>but mind the classes the classes on the img will be replaced to the containing div.

Posted in 3D Tutorials | No Comments »

