Game Development Reference
In-Depth Information
Attribute
Definition
It selects an E element that has been checked through its cor-
responding attribute, or through appropriate user interaction
E:checked
It selects an E element that does not match a selector expres-
sion S
E:not(S)
It selects an E element preceded by an F element
F ~ E
Source: Cascading Style Sheets (CSS) Snapshot 2010, W3C Working Group Note
12 May 2011
Colors
The two main additions to colors in CSS Level 3 are the adoption of HSL colors, and
an additional alpha channel. Before, you could specify a color using RGB by spe-
cifying a value between 0 and 255 for each channel (red, green, and blue). Now the
extra alpha channel can be appended to the end of the attribute, allowing you to con-
trol the level of transparency:
div { background: RGBA(255, 255, 255, 0.5);
This CSS rule specifies a completely white background, with an opacity of 50 percent
(half transparent) represented by the decimal fraction:
div { background: RGBA(100%, 100%, 100%, 50%);
Alternatively, you can specify the same CSS rule using percentages for all values,
which might be easier to read, and make the expression more consistent.
 
Search WWH ::




Custom Search