light Filter

DHTML, HTML, & CSS

light Filter


Simulates the projection of a light source onto the selected visual object.

Syntax

HTML<ELEMENT STYLE = "filter: light(sProperties)" ... >
Scriptingobject.style.filter = "light(sProperties)"

Possible Values

sProperties String that specifies one or more properties exposed by the filter.

Remarks

By setting or changing the properties of the light filter, you can control the virtual position of the light source. You also can control the x and y coordinates of the light's focus, as well as the light's type (point or cone), color, and intensity. The maximum number of lights available to each visual filter control is 10. To add more than 10 lights to your page, you must use multiple visual filter controls.

When a light effect is created, it has a default ambient light associated with it. The first light you add to the object replaces this default ambient light.

You can associate only one object per light effect. To light several different objects (for example, a text phrase and a bitmap image), you must use a separate instance of the light filter effect for each object. However, if you combine several objects into a single object by using a DIV element, you can use one light object to light the combined object.

Members

Example

This example uses the light filter and the addCone method to apply a red cone filter to a DIV element.

Sample Code

<STYLE>
   .aFilter {background-color: #FFFFFF; filter: light();
             color: #000000;
             width: 150;}
</STYLE>
<SCRIPT>
window.onload=fnInit;
function fnInit(){
   var iX2=oDiv.offsetWidth/2;
   var iY2=oDiv.offsetHeight;
   oDiv.filters[0].addCone(0,0,1,iX2,iY2,255,0,0,20,60);
}
</SCRIPT>		
<DIV CLASS="aFilter" ID="oDiv">
This text is highlighted by a red cone light.
</DIV>

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
BODY, BUTTON, DIV, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, MARQUEE, runtimeStyle, SPAN, style, TABLE, TD, TEXTAREA, TH

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.