๑۩۞۩๑ » WEBTOOLS « ๑۩۞۩๑
WEBTOOLS FORUM - RECOMMENDED SETTINGS/SETARI RECOMANDATE: BROWSER=MOZILLA FIREFOX OR IE REZOLUTION=1280x1024| FORUMUL ESTE IN PLINA DEZVOLTARE VA RUGAM SA NE AJUTATI! ► DATA INFIINTARII: 19-07-2008 ►
|
Lista Forumurilor Pe Tematici
|
๑۩۞۩๑ » WEBTOOLS « ๑۩۞۩๑ | Inregistrare | Login
POZE ๑۩۞۩๑ » WEBTOOLS « ๑۩۞۩๑
Nu sunteti logat.
|
Nou pe simpatie: lovely_pink pe Simpatie
 | Femeie 24 ani Bucuresti cauta Barbat 26 - 49 ani |
|
|
AndreyNek
Moderator
Din: Undeva pe Terra
Inregistrat: acum 17 ani
Postari: 17443
|
|
Background culoare sau imagine poate fi definita pentru intreaga pagina, o celula a tabelului sau pentru text.
5.1 Culoare de fond background-color defineste culoarea de fond si poate fi asociat oricarei etichete HTML.
CSS/exemplu5_1.html">Exemplu: definim un stil pentru intreg BODY si un altul pentru eticheta p
Code:
<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> |
5.2 Imagine de fond Imaginile pot fi folosite ca fundal in spatele intregii pagini, a unui obiect sau a textului. background-image asociaza o imagine ca fundal unui obiect.
Exemplu: definim un stil pentru eticheta p
Code:
<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> |
5.3 Repetare Functie de dimensiunile obiectului caruia ii sunt asociate imaginile de fond se repeta pe orizontala si verticala. Repetarea poate fi controlata prin parametrul background-repeat care poate lua valorile:
Code:
repeat-x imaginea se repeta pe orizontala
repeat-y imaginea se repeta pe verticala
no-repeat imaginea nu se repeta |
Exemplu: imaginea nu se repeta sub eticheta p
Code:
<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> |
5.4 Pozitia In mod normal imaginea de fundal incepe din coltul stanga sus al obiectului asociat, dar acest lucru poate fi controlat prin comanda CSS background-position. Sunt acceptate doua valori: in prima pozitie poate fi: top, center, bottom, percentage sau pixel in a doua pozitie poate fi: right, center, left, percentage sau pixel
Exemplu: imaginea de fundal este asociata etichetei BODY fiind amplasata top si center, fara repetare
Code:
<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> |
_______________________________________



|
|
| pus acum 17 ani |
|