Siirry sivun sisältöön Avut CSS HTML JavaScript Kotisivu

CSS1-ominaisuusreferenssi

Sivun taulukko toimii CSS1-suosituksen ominaisuuksien ja niiden arvojen pikareferenssinä. Linkit johtavat yksityiskohtaisempiin lisätietoihin ja ominaisuuksien kohdalla myös esimerkkeihin.

Ominaisuudet Sallitut arvot
Fonttiominaisuudet
font-family [[<fonttinimi> | <kirjasinperhe>],]* [<fonttinimi> | <kirjasinperhe>]
font-size <absoluuttinen koko> | <suhteellinen koko> | <mitta> | <prosentti>
font-style normal | italic | oblique
font-variant normal | small-caps
font-weight normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
font [ <font-style> || <font-variant> || <font-weight> ]? <font-size> [ / <line-height> ]? <font-family>
Värin ja taustan ominaisuudet
color <väri>
background-color <väri> | transparent
background-image <url> | none
background-repeat repeat | repeat-x | repeat-y | no-repeat
background-attachment scroll | fixed
background-position [<prosentti> | <mitta>]{1,2} | [top | center | bottom] || [left | center | right]
background <background-color> || <background-image> || <background-repeat> || <background-attachment> || <background-position>
Tekstin ominaisuudet
word-spacing normal | <mitta>
letter-spacing normal | <mitta>
text-decoration none | [ underline || overline || line-through || blink ]
vertical-align baseline | sub | super | top | text-top | middle | bottom | text-bottom | <prosentti>
text-transform capitalize | uppercase | lowercase | none
text-align left | right | center | justify
text-indent <mitta> | <prosentti>
line-height normal | <numero> | <mitta> | <prosentti>
Luokitusominaisuudet
display block | inline | list-item | none
white-space normal | pre | nowrap
list-style-type disc | circle | square | decimal | lower-roman | upper-roman | lower-alpha | upper-alpha | none
list-style-image <url> | none
list-style-position inside | outside
list-style [disc | circle | square | decimal | lower-roman | upper-roman | lower-alpha | upper-alpha | none] || [inside | outside] || [<url> | none]
Laatikko-ominaisuudet
margin-top <mitta> | <prosentti> | auto
margin-right <mitta> | <prosentti> | auto
margin-bottom <mitta> | <prosentti> | auto
margin-left <mitta> | <prosentti> | auto
margin [ <mitta> | <prosentti> | auto ]{1,4}
padding-top <mitta> | <prosentti>
padding-right <mitta> | <prosentti>
padding-bottom <mitta> | <prosentti>
padding-left <mitta> | <prosentti>
padding [ <mitta> | <prosentti> ]{1,4}
border-top-width thin | medium | thick | <mitta>
border-right-width thin | medium | thick | <mitta>
border-bottom-width thin | medium | thick | <mitta>
border-left-width thin | medium | thick | <mitta>
border-width [thin | medium | thick | <mitta>]{1,4}
border-color <väri>{1,4}
border-style none | dotted | dashed | solid | double | groove | ridge | inset | outset
border-top <border-top-width> || <border-style> || <väri>
border-right <border-right-width> || <border-style> || n<väri>
border-bottom <border-bottom-width> || <border-style> || <väri>
border-left <border-left-width> || <border-style> || <väri>
border <border-width> || <border-style> || <väri>
width <mitta> | <prosentti> | auto
height <mitta> | auto
float left | right | none
clear none | left | right | both

yksi taso ylös