Bg-gradient-type
From Frontal Wiki
Contents |
Purpose
This style is part of a group of styles used to add gradient backgrounds to visual elements. This particular style sets the type of the gradient background.
Value
The bg-gradient-type style accepts "linear", "radial" or "none". The default value is not set.
bg-gradient-type: radial;
Remarks
Gradient backgrounds are implemented using a feature of Flash. More information may be found in the Flash documentation for Graphics.beginGradientFill.
In order to create a gradient background in frontal, all of the bg-gradient styles must be set:
- bg-gradient-type
- bg-gradient-colors
- bg-gradient-alphas
- bg-gradient-ratios
- bg-gradient-matrix
- bg-gradient-spread
- bg-gradient-interpolation
- bg-gradient-focal-point-ratio
Moreover, bg-gradient-type must be set for the particular visual element that is to have the gradient background. (All of the other styles are cascading.)
Example
This example shows the effect of changing the type of the gradient on roll over and roll out of the mouse.
<style><![CDATA[ div { bg-gradient-type: linear; bg-gradient-colors: [ 0xFF5500, 0x0000FF ]; bg-gradient-alphas: [ 1, 1 ]; bg-gradient-ratios: [ 0, 255 ]; bg-gradient-matrix: [ 400, 400, .785, 0, 0 ]; bg-gradient-spread: reflect; bg-gradient-interpolation: rgb; bg-gradient-focal-point-ratio: 0; background-shape: ellipse; } div:hover { bg-gradient-type: radial; } ]]></style> <div style="width: 400px; height: 400px; margin: auto;"/>
Can Be Applied To
This style can be applied to all visual elements in particular: