CSS/Tło

Z Wikibooks, biblioteki wolnych podręczników.
< CSS

background-image, background-color

Definiuje kolor lub grafikę tła strony.

  • background-image
Przykładowo:
    body { background-image: url('http://www.earthtimes.org/newsimage/background-noise-can-effect-students-test-scores_3110.jpg'); }
HTML:
<style>
body { background-image: url('http://www.earthtimes.org/newsimage/background-noise-can-effect-students-test-scores_3110.jpg'); }
</style>
<body>
<h1 style="color: #000">Wikipedia</h1>
</body>


  • background-color
Przykładowo:
    body { background-color: #000; }
HTML:
<style>
body { background-color: #000; }
</style>
<body>
<h1 style="color: #FFF">Wikipedia</h1>
</body>