Professional Documents
Culture Documents
537
Classification Properties
Classification properties affect how the boxes in the box model are rendered.
clear
This forces elements, which would normally wrap around an aligned element, to display below it.
Value indicates which side may not touch an aligned element.
p {clear:left;}
Value
IE
Inherited
No
none
Default
none
both
Applies to
All elements
left
right
inherit
display
This specifies how an element is rendered, if at all. If set to none the element is not rendered, and it
does not take up any space. This property can also force an inline element to display as a block or
vice versa.
span.important {display:block;}
Value
IE
Inherited
Yes
none
Default
inline
inline
Applies to
All elements
block
list-item
inherit
Although the default value of this property is inline, browsers tend to treat the element depending
on its inherent display type. Block-level elements, such as headings and paragraphs, get treated as if
the default were block, whereas inline elements such as <i>, <b>, or <span> get treated as inline.
float
Subsequent elements should be wrapped to the left or right of the element, rather than below.
img.featuredItem {float:left;}
538
Value
IE
Inherited
No
none
Default
none
left
Applies to
All elements
right
inherit
visibility
This specifies whether an element should be displayed or hidden. Even if hidden, elements take up
space on the page but are transparent.
Value
IE
Inherited
No
visible
Default
inherit
show
Applies to
All elements
hidden
hide
collapse
inherit
Internationalization Properties
Internationalization properties affect how text is rendered in different languages.
direction
This specifies the direction of text from left to right or right to left. This should be used in association with the unicode-bidi property.
td.word{direction:rtl; unicode-bidi:bidi-override;}
Value
IE
Inherited
Yes
ltr
Default
ltr
rtl
Applies to
All elements
inherit
539
unicode-bidi
The unicode-bidi property enables you to override Unicodes built-in directionality settings
for languages.
td.word{unicode-bidi:bidi-override; direction:rtl; }
Value
IE
Inherited
No
normal
Default
normal
embed
Applies to
All elements
bidi-override
inherit
Color
The CSS3 Color module offers the ability to specify colors using the Hue Saturation and Lightness
(HSL) scheme, as well as the ability to set an alpha channel to define transparency using both RGBA
and HSLA notation.
.hsl {
background-color : hsl( 333,50%,50% );
}
.hsla {
background-color : hsla( 0, 100%, 50%, 0.5 );
}
.rgba {
background-color : rgba( 255, 0, 0, 0.5);
}
Value
IE
FF
Safari
Chrome
Opera
hsl
3.1
9.5
hsla
3.1
10
rgba
3.1
10
540
Inherited
No
auto
Default
auto
[length]
Applies to
All elements
[percentage]
inherit
box-shadow
The possible values for this property are
inset offset-x offset-y blur-radius spread-radius color
.drop-shadow {
// inset offset-x offset-y blur-radius spread-radius color
-webkit-box-shadow : 0px 0px 4px 0px #000000;
box-shadow : 0px 0px 4px 0px #000000;
}
Value
Inherited
No
none
Default
auto
[inset]
Applies to
All elements
[offset-x] [offset-y]
[blur-radius]
[spread-radius]
[color]
541
IE
FF
Safari
Chrome
Opera
box-shadow
3.5*/4.0
3*/5.1
1*/10
10.5
border-radius
1*/2.0
3*/5
.2*/4
10.5
Multi-Column
The CSS Multi-Column layout module enables the definition of multiple columns of text.
.fixed-width {
width:500px;
height:200px;
-webkit-column-count: 3;
-webkit-column-gap: 15px;
-moz-column-count: 3;
-moz-column-gap: 15px;
column-count: 3;
column-gap: 15px;
}
.percentage-width {
width:100%;
height:200px;
-webkit-column-width: 100px;
-webkit-column-gap: 15px;
-moz-column-width: 100px;
-moz-column-gap: 15px;
column-width: 100px;
column-gap: 15px;
}
column-count
This defines the number of columns in an element.
Value
Inherited
No
auto
Default
auto
[integer]
Applies to
542
column-gap
This defines the gutter between the columns of a multi-column element.
Value
Inherited
No
normal
Default
1em
[length]
Applies to
Multi-column elements
column-width
This defines the width of the columns of a multi-column element.
Value
Inherited
No
auto
Default
auto
[length]
Applies to
Multi-column elements
IE
FF
Safari
Chrome
Opera
column-count
10
1.5*
3*
1*
11.1
column-gap
10
1.5*
3*
1*
11.1
column-width
10
1.5*
3*
1*
11.1
Media Queries
The CSS Media Queries module enables the definition of styles based on device and browser
characteristics.
#container {
width : 940px;
}
@media screen and (max-width:999px) {
#container {
width : 740px;
}
}
@media screen and (max-width:480px)
{
543
#container {
width : 400px;
}
}
Description
width
Tests the width of the display area of the device in a browser. This
is equal to the width of the browser window.
height
Tests the height of the display area of the device. In a browser this
is equal to the height of the browser window.
device-width
device-height
orientation
aspect-ratio
device-aspect-ratio
color
color-index
monochrome
resolution
scan
grid
IE
FF
Safari
Chrome
Opera
3.5
9.5
544
@font-face
The CSS Fonts Modules enable the use of custom fonts.
@font-face {
font-family: 'InconsolataMedium';
src: url('Inconsolata-webfont.eot');
src: url('Inconsolata-webfont.eot?#iefix') format('embedded-opentype'),
url('Inconsolata-webfont.woff') format('woff'),
url('Inconsolata-webfont.ttf') format('truetype'),
url('Inconsolata-webfont.svg#InconsolataMedium') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face
IE
FF
Safari
Chrome
Opera
3.5
3.1
10
2D Transforms
The 2D Transforms module introduces a new property that enables the rotation, translation, and
scaling of a box, without changing its place in the flow of the document.
#rotate {
-webkit-transform : rotate(20deg);
-moz-transform : rotate(20deg);
-ms-transform : rotate(20deg);
-o-transform : rotate(20deg);
transform : rotate(20deg);
background : #00ffcc;
top : 100px;
left : 50px;
}
#scale {
-webkit-transform : scale(0.5);
-moz-transform : scale(0.5);
-ms-transform : scale(0.5);
-o-transform : scale(0.5);
transform : scale(0.5);
background : #ccff00;
top : 400px;
left : 50px;
}
The following table lists the common functions of the transform property and gives a small
example of each.