CSS2 referenssi
Selaimet: IE: Internet Explorer, F: Firefox, N: Netscape.
W3C: Numero "W3C" -sarakkeessa ilmoittaa missä CSS:n suosituksessa ominaisuus on määritelty (CSS1 vai CSS2).
| Ominaisuus |
Kuvaus |
Arvot |
IE |
F |
N |
W3C |
| background |
Lyhyt tapa esittää kerralla kaikki taustaan liittyvät ominaisuudet |
background-color
background-image
background-repeat background-attachment background-position |
4 |
1 |
6 |
1 |
| background-attachment |
Määritetään onko taustakuva jähmetettynä selaimen pohjalle vai rullaako se sivun mukana. |
scroll
fixed |
4 |
1 |
6 |
1 |
| background-color |
Elementin taustaväri. |
color-rgb
color-hex
color-name
transparent |
4 |
1 |
4 |
1 |
| background-image |
Taustakuva. |
url(URL)
none |
4 |
1 |
4 |
1 |
| background-position |
Taustakuvan aloituspaikka. |
top left
top center
top right
center left
center center
center right
bottom left
bottom center
bottom right
x% y%
xpos ypos |
4 |
1 |
6 |
1 |
| background-repeat |
Taustakuvan toistaminen. |
repeat
repeat-x
repeat-y
no-repeat |
4 |
1 |
4 |
1 |
| Ominaisuus |
Kuvaus |
Arvot |
IE |
F |
N |
W3C |
| border |
Lyhyt tapa esittää kerralla kaikkien neljän kantin reunamääritykset. |
border-width
border-style
border-color |
4 |
1 |
4 |
1 |
| border-bottom |
Lyhyt tapa esittää alareunan määritykset. |
border-bottom-width
border-style
border-color |
4 |
1 |
6 |
1 |
| border-bottom-color |
Alareunan väri. |
border-color |
4 |
1 |
6 |
2 |
| border-bottom-style |
Alareunan tyyli. |
border-style |
4 |
1 |
6 |
2 |
| border-bottom-width |
Alareunan paksuus. |
thin
medium
thick
length |
4 |
1 |
4 |
1 |
| border-color |
Reunojen värit, anna yhdestä neljään väriä. |
color |
4 |
1 |
6 |
1 |
| border-left |
Lyhyt tapa esittää vasemman reunan määritykset. |
border-left-width
border-style
border-color |
4 |
1 |
6 |
1 |
| border-left-color |
Vasemman reunan väri. |
border-color |
4 |
1 |
6 |
2 |
| border-left-style |
Vasemman reunan tyyli. |
border-style |
4 |
1 |
6 |
2 |
| border-left-width |
Vasemman reunan paksuus. |
thin
medium
thick
length |
4 |
1 |
4 |
1 |
| border-right |
Lyhyt tapa esittää oikean reunan määritykset. |
border-right-width
border-style
border-color |
4 |
1 |
6 |
1 |
| border-right-color |
Oikean reunan väri. |
border-color |
4 |
1 |
6 |
2 |
| border-right-style |
Oikean reunan tyyli. |
border-style |
4 |
1 |
6 |
2 |
| border-right-width |
Oikean reunan paksuus. |
thin
medium
thick
length |
4 |
1 |
4 |
1 |
| border-style |
Kaikkien reunojen tyyli, anna yhdestä neljään tyyliä. |
none
hidden
dotted
dashed
solid
double
groove
ridge
inset
outset |
4 |
1 |
6 |
1 |
| border-top |
Lyhyt tapa esittää yläreunan määritykset. |
border-top-width
border-style
border-color |
4 |
1 |
6 |
1 |
| border-top-color |
Yläreunan väri. |
border-color |
4 |
1 |
6 |
2 |
| border-top-style |
Yläreunan tyyli. |
border-style |
4 |
1 |
6 |
2 |
| border-top-width |
Yläreunan paksuus. |
thin
medium
thick
length |
4 |
1 |
4 |
1 |
| border-width |
Lyhyt tapa esittää reunojen paksuus, anna yhdestä neljään paksuutta. |
thin
medium
thick
length |
4 |
1 |
4 |
1 |
| Ominaisuus |
Kuvaus |
Arvot |
IE |
F |
N |
W3C |
| clear |
Määrittää millä elementin reunoilla ei sallita muita kelluvia elementtejä. |
left
right
both
none |
4 |
1 |
4 |
1 |
| cursor |
Näytettävän kursorin ulkoasu. |
url
auto
crosshair
default
pointer
move
e-resize
ne-resize
nw-resize
n-resize
se-resize
sw-resize
s-resize
w-resize
text
wait
help |
4 |
1 |
6 |
2 |
| display |
Näytetäänkö elementti ja jos, niin kuinka. |
none
inline
block
list-item
run-in
compact
marker
table
inline-table
table-row-group
table-header-group
table-footer-group
table-row
table-column-group
table-column
table-cell
table-caption |
4 |
1 |
4 |
1 |
| float |
Missä kuva tai teksti näytetään toisessa elementissä. |
left
right
none |
4 |
1 |
4 |
1 |
| position |
Sijoittaa elementin staattiseen, suhteelliseen (relative), absoluuttiseen or jähmetettyyn paikkaan. |
static
relative
absolute
fixed |
4 |
1 |
4 |
2 |
| visibility |
Määrittää tuleeko elementin näkyä vai olla piilossa. |
visible
hidden
collapse |
4 |
1 |
6 |
2 |
| Ominaisuus |
Kuvaus |
Arvot |
IE |
F |
N |
W3C |
| height |
Elementin korkeus. |
auto
length
% |
4 |
1 |
6 |
1 |
| line-height |
Riviväli. |
normal
number
length
% |
4 |
1 |
4 |
1 |
| max-height |
Elementin maksimikorkeus. |
none
length
% |
- |
1 |
6 |
2 |
| max-width |
Elementin maksimileveys. |
none
length
% |
- |
1 |
6 |
2 |
| min-height |
Elementin minimikorkeus. |
length
% |
- |
1 |
6 |
2 |
| min-width |
Elementin minimileveys. |
length
% |
- |
1 |
6 |
2 |
| width |
Elementin leveys. |
auto
%
length |
4 |
1 |
4 |
1 |
| Ominaisuus |
Kuvaus |
Arvot |
IE |
F |
N |
W3C |
font
|
Lyhyt tapa esittää kaikki fontin määritykset. |
font-style
font-variant
font-weight
font-size/line-height
font-family
caption
icon
menu
message-box
small-caption
status-bar |
4 |
1 |
4 |
1 |
font-family
|
Luettelo elementille halutuista fonteista tärkeysjärjestyksessä. |
family-name
generic-family |
3 |
1 |
4 |
1 |
font-size
|
Fonttikoko. |
xx-small
x-small
small
medium
large
x-large
xx-large
smaller
larger
length
% |
3 |
1 |
4 |
1 |
| font-size-adjust
|
|
none
number |
- |
- |
- |
2 |
| font-stretch
|
Merkkien tiivistäminen tai leventäminen. |
normal
wider
narrower
ultra-condensed
extra-condensed
condensed
semi-condensed
semi-expanded
expanded
extra-expanded
ultra-expanded |
- |
- |
- |
2 |
font-style
|
Fonttityyli. |
normal
italic
oblique |
4 |
1 |
4 |
1 |
font-variant
|
Pienet kapiteelit tai normaali teksti. |
normal
small-caps |
4 |
1 |
6 |
1 |
font-weight
|
Fontin paino eli lihavointi. |
normal
bold
bolder
lighter
100
200
300
400
500
600
700
800
900 |
4 |
1 |
4 |
1 |
| Ominaisuus |
Kuvaus |
Arvot |
IE |
F |
N |
W3C |
| content
|
Tuottaa sisältöä dokumenttiin. Käytetään :before ja :after
pseudo-elementtien kanssa. |
string
url
counter(name)
counter(name, list-style-type)
counters(name, string)
counters(name, string, list-style-type)
attr(X)
open-quote
close-quote
no-open-quote
no-close-quote |
|
1 |
6 |
2 |
| counter-increment
|
Laskurin askel. |
none
identifier number |
|
|
|
2 |
| counter-reset
|
Laskurin nollausarvo. |
none
identifier number |
|
|
|
2 |
| quotes
|
Lainausmerkkien tyyppi. |
none
string string |
- |
1 |
6 |
2 |
| Ominaisuus |
Kuvaus |
Arvot |
IE |
F |
N |
W3C |
| list-style |
Lyhyt tapa esittää luettelon määritteet. |
list-style-type
list-style-position
list-style-image |
4 |
1 |
6 |
1 |
| list-style-image |
Kuva luettelomerkiksi. |
none
url |
4 |
1 |
6 |
1 |
| list-style-position |
Luettelomerkin sijoittelu. |
inside
outside |
4 |
1 |
6 |
1 |
| list-style-type |
Luettelomerkin tyyppi. |
none
disc
circle
square
decimal
decimal-leading-zero
lower-roman
upper-roman
lower-alpha
upper-alpha
lower-greek
lower-latin
upper-latin
hebrew
armenian
georgian
cjk-ideographic
hiragana
katakana
hiragana-iroha
katakana-iroha |
4 |
1 |
4 |
1 |
| marker-offset |
|
auto
length |
|
1 |
7 |
2 |
| Ominaisuus |
Kuvaus |
Arvot |
IE |
F |
N |
W3C |
| margin
|
Lyhyt tapa esittää reunusten määritteet. |
margin-top
margin-right
margin-bottom
margin-left |
4 |
1 |
4 |
1 |
|
margin-bottom
|
Elementin alareunus. |
auto
length
% |
4 |
1 |
4 |
1 |
|
margin-left
|
Elementin vasen reunus. |
auto
length
% |
3 |
1 |
4 |
1 |
|
margin-right
|
Elementin oikea reunus. |
auto
length
% |
3 |
1 |
4 |
1 |
| margin-top
|
Elementin yläreunus. |
auto
length
% |
3 |
1 |
4 |
1 |
| Ominaisuus |
Kuvaus |
Arvot |
IE |
F |
N |
W3C |
| outline
|
Lyhyt tapa esittää ulkoviivojen ominaisuudet. |
outline-color
outline-style
outline-width |
- |
1.5 |
- |
2 |
|
outline-color
|
Ulkoviivan väri. |
color
invert |
- |
1.5 |
- |
2 |
|
outline-style
|
Ulkoviivan tyyli. |
none
dotted
dashed
solid
double
groove
ridge
inset
outset |
- |
1.5 |
- |
2 |
|
outline-width
|
Ulkoviivan paksuus. |
thin
medium
thick
length |
- |
1.5 |
- |
2 |
| Ominaisuus |
Kuvaus |
Arvot |
IE |
F |
N |
W3C |
| padding |
Lyhyt tapa esittää kaikki täytön ominaisuudet. |
padding-top
padding-right
padding-bottom
padding-left |
4 |
1 |
4 |
1 |
|
padding-bottom
|
Elementin alapuolen täyttö. |
length
% |
4 |
1 |
4 |
1 |
|
padding-left
|
Elementin vasemman puolen täyttö. |
length
% |
4 |
1 |
4 |
1 |
|
padding-right
|
Elementin oikean puolen täyttö. |
length
% |
4 |
1 |
4 |
1 |
| padding-top |
Elementin yläpuolen täyttö. |
length
% |
4 |
1 |
4 |
1 |
| Ominaisuus |
Kuvaus |
Arvot |
IE |
F |
N |
W3C |
| bottom |
|
auto
%
length |
5 |
1 |
6 |
2 |
| clip |
Elementin muoto. |
shape
auto |
4 |
1 |
6 |
2 |
| left |
|
auto
%
length |
4 |
1 |
4 |
2 |
overflow
|
|
visible
hidden
scroll
auto |
4 |
1 |
6 |
2 |
| position |
|
static
relative
absolute
fixed |
4 |
1 |
4 |
2 |
| right |
|
auto
%
length |
5 |
1 |
6 |
2 |
| top |
|
auto
%
length |
4 |
1 |
4 |
2 |
| vertical-align |
Pystytasaus. |
baseline
sub
super
top
text-top
middle
bottom
text-bottom
length
% |
4 |
1 |
4 |
1 |
| z-index |
|
auto
number |
4 |
1 |
6 |
2 |
| Ominaisuus |
Kuvaus |
Arvot |
IE |
F |
N |
W3C |
| border-collapse |
Taulukon reunamalli. |
collapse
separate |
5 |
1 |
7 |
2 |
| border-spacing |
Reunojen välistys. |
length length |
- |
1 |
6 |
2 |
| caption-side
|
Taulukko-otsikon sijoittelu. |
top
bottom
left
right |
- |
1 |
6 |
2 |
| empty-cells
|
Tyhjien solujen reunat. |
show
hide |
- |
1 |
6 |
2 |
| table-layout
|
|
auto
fixed |
5 |
1 |
6 |
2 |
| Ominaisuus |
Kuvaus |
Arvot |
IE |
F |
N |
W3C |
| color |
Tekstin väri. |
color |
3 |
1 |
4 |
1 |
| direction |
Tekstin suunta. |
ltr
rtl |
6 |
1 |
6 |
2 |
| line-height |
Riviväli. |
normal
number
length
% |
4 |
1 |
4 |
1 |
| letter-spacing |
Merkkiväli. |
normal
length |
4 |
1 |
6 |
1 |
| text-align |
Tasaus. |
left
right
center
justify |
4 |
1 |
4 |
1 |
| text-decoration |
Tehosteet. |
none
underline
overline
line-through
blink |
4 |
1 |
4 |
1 |
| text-indent |
Ensimmäisen rivin sisennys. |
length
% |
4 |
1 |
4 |
1 |
| text-shadow |
|
none
color
length |
|
|
|
|
| text-transform |
|
none
capitalize
uppercase
lowercase |
4 |
1 |
4 |
1 |
| unicode-bidi |
|
normal
embed
bidi-override |
5 |
|
|
2 |
| white-space |
Välilyöntien käsittely. |
normal
pre
nowrap |
5 |
1 |
4 |
1 |
| word-spacing |
Sanojen välistys. |
normal
length |
6 |
1 |
6 |
1 |
| Pseudo-luokka |
Tarkoitus |
IE |
F |
N |
W3C |
| :active |
Erikoinen tyyli aktiiviselle elementille. |
4 |
1 |
8 |
1 |
| :focus |
Erikoinen tyyli fokusoidulle elementille. |
- |
- |
- |
2 |
| :hover |
Erikoinen tyyli kun ollaan hiirellä elementin päällä. |
4 |
1 |
7 |
1 |
| :link |
Erikoinen tyyli käyttämättömälle linkille. |
3 |
1 |
4 |
1 |
| :visited |
Erikoinen tyyli käytetylle linkille. |
3 |
1 |
4 |
1 |
| :first-child |
|
|
1 |
7 |
2 |
| :lang |
|
|
1 |
8 |
2 |
| Pseudo-elementti |
Tarkoitus |
IE |
F |
N |
W3C |
| :first-letter |
Erikoinen tyyli tekstin ensimmäiselle kirjaimelle. |
5 |
1 |
8 |
1 |
| :first-line |
Erikoinen tyyli tekstin ensimmäiselle riville. |
5 |
1 |
8 |
1 |
| :before |
Sisältöä ennen elementtiä. |
|
1.5 |
8 |
2 |
| :after |
Sisältöä elementin perään. |
|
1.5 |
8 |
2 |
|