Obrazek na środku strony

<style type="text/css">
<!--
body
{
  background-image: url(kotek.jpg);
  background-repeat: no-repeat;
  background-position: center center
}
-->
</style>

Opis cechy background-image:

5.3.3 'background-image'
Value: <url> | none
Initial: none
Applies to: all elements
Inherited: no
Percentage values: N/A

Opis cechy background-repeat:

5.3.4 'background-repeat'
Value: repeat | repeat-x | repeat-y | no-repeat
Initial: repeat
Applies to: all elements
Inherited: no
Percentage values: N/A

Opis cechy background-position:

5.3.6 'background-position'
Value: [<percentage> | <length>]{1,2} | [top | center | bottom] || [left | center | right]
Initial: 0% 0%
Applies to: block-level and replaced elements
Inherited: no
Percentage values: refer to the size of the element itself

Zobacz też:

5.1 Notation for property values

Strona główna