Tutorial CSSData publicarii: Martie 2006
CSS
Mar
2006
Stiluri pentru backgroundBackground culoare sau imagine poate fi definita pentru intreaga pagina, o celula a tabelului sau pentru text.
Culoare de fond
Exemplu: definim un stil pentru intreg BODY si un altul pentru eticheta p
<html>
<head> <title>Exemplu 5_1</title> <style type="text/css"> <!-- body {background-color: #FFFF00;} p {background-color: #FF0000;} --> </style> </head> <body> Text normal <p>Text cu background rosu</p> </body> </html>
Imagine de fond
Exemplu: definim un stil pentru eticheta p
<html>
<head> <title>Exemplu 5_2</title> <style type="text/css"> <!-- p {background-image: url(poza.jpg);} --> </style> </head> <body> Text normal <p>Text cu imagine de fond</p> </body> </html>
Repetare
Exemplu: imaginea nu se repeta sub eticheta p
<html>
<head> <title>Exemplu 5_3</title> <style type="text/css"> <!-- p {background-image: url(poza.jpg); background-repeat: no-repeat;} --> </style> </head> <body> Text normal <p>Text cu imagine de fond</p> </body> </html>
Pozitia
Exemplu: imaginea de fundal este asociata etichetei BODY fiind amplasata top si center, fara repetare
<html>
<head> <title>Exemplu 5_4</title> <style type="text/css"> <!-- body {background-image: url(poza.jpg); background-repeat: no-repeat; background-position: top center;} --> </style> </head> <body> Text normal </body> </html> |
Copyright © 2005-2023
Termeni si conditii
| |
Comentarii:
|