css light 属性值的含义

html-css010

css light 属性值的含义,第1张

Syntax

object.filters.item("DXImageTransform.Microsoft.Light").

addCone(iX1, iY1, iZ1, iX2, iY2, iRed, iGreen, iBlue, iStrength, iSpread)

Parameters

iX1 Required. Integer that specifies the left coordinate of the light source.

//必填,整型,指明光源的X坐标

iY1 Required. Integer that specifies the top coordinate of the light source.

//必填,整型,指明光源的Y坐标

iZ1 Required. Integer that specifies the z-axis level of the light source.

//必填,整型,指明光源高度

iX2 Required. Integer that specifies the left coordinate of the target light focus.

//必填,整型,指明光源焦点的X坐标

iY2 Required. Integer that specifies the top coordinate of the target light focus.

//必填,整型,指明光源焦点的Y坐标

iRed Required. Integer that specifies the red value. The value can range from 0 (lowest saturation) to 255 (highest saturation).

iGreen Required. Integer that specifies the green value. The value can range from 0 (lowest saturation) to 255 (highest saturation).

iBlue Required. Integer that specifies the blue value. The value can range from 0 (lowest saturation) to 255 (highest saturation).

//iRed、iGreen、iBlue 光源颜色的RGB三原色分量,必填,0~255整数

iStrength Required. Integer that specifies the intensity of the light filter. The value can range from 0 (lowest intensity) to 100 (highest intensity).

//光源长度,0~100

iSpread Required. Integer that specifies the angle, or spread, between the vertical position of the light source and the surface of the object. The angle can range from 0 to 90 degrees. Smaller angle values produce a smaller cone of lightlarger values produce an oblique oval or circle of light.

//角度

我想如果

只要字体和图片产生阴影效果

用滤镜Shadow就可以实现呀

Filter:Shadow(Color=color,Direction=direction)

可以在指定的方向建立投影,Color是指定发光的颜色,Strength指定发光的强度,参数值从1到255

使对象的边缘产生类似发光的效可用滤镜

Filter:Glow(Color=color,Strength=strength)

Direction参数用来指定投影的方向

举个例,比如说你想让你的空间名产生发光和阴影效果,可以这样写

#header div.tit{top:4pxLEFT:100pxfont-size:30pxfont-family:楷体FILTER:Glow(Color=#33ADFF,Strength=4) Shadow(Color=#003355,Direction=180)color:#FFF}