| You are here: Home > Scripts > Javascript Drop Shadow Image |
| ||||||||||||||||||
|
Back to ScriptsJavascript, Shadow and DropShadowRequires Internet Explorer 5.5 or later to work The DIV is located below, before applying image filters the image object requires its layout to be set. We do that by setting its height and width properties (done inside the style tag). Having the layout defined can also be done by setting the position attribute to absolute. Or the layout can be defined by setting the property CONTENTEDITABLE in the div. There are TWO specific filters to create shadows (shadow and dropshadow) One filter makes a solid mask in the given color (dropshadow), the other creates a 3D type effect (shadow). Shadow takes 3 parameters color which can either be gray, red, green or defined numerically as #AAAAAA, #FF0000, #00FF00 direction in degrees, 0 - 359. 0 (top or 12 o'clock), 90 (right angle or 3 o'clock) 180 (down or 6 o'clock) strength is the length of the shadow, getting lighter the longer it gets DropShadow takes 4 parameters color which can be defined by name (gray) or by value (#AAAAAA) OffX Offset X, in pixels OffY Offset Y, in pixels Positive takes value true or false. If true the drop shadow is the image and text mask. If false then the shadow is the negative space instead (see example below) Note: the drop shadow does NOT take into account transparency in images and renders them as blocks
DHTML SourceReferences: MSDN - Drop Shadow MSDN - Shadow |
|
contact us: elouai@gmail.com ©2003-2008 eLouai.com, All rights reserved |