AgerNic.com/ro
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL
Tutorial

Un CSS cuprinde reguli de stil care sunt interpretate de browser ?i apoi aplicate elementelor corespunz?toare din documentul dvs. O regul? de stil este alc?tuit? din trei p?r?i

Selector - Un selector este o etichet? HTML la care se va aplica un stil. Aceasta poate fi orice etichet? precum <h1> sau <table> etc.

Proprietate - O proprietate este un tip de atribut al etichetei HTML. Pur ?i simplu, toate atributele HTML sunt convertite în propriet??i CSS. Ar putea fi de culoare, margine etc.

Valoare - Valorile sunt atribuite propriet??ilor. De exemplu, proprietatea de culoare poate avea valoare fie ro?ie, fie # F1F1F1 etc.

Pute?i pune sintaxa regulii stilului CSS dup? cum urmeaz? -

Sintax:

p { color: red; }

Unde:
p - este selectorul
color: red; - declarare

Fiecare declara?ie include un nume de proprietate CSS ?i o valoare, separate prin dou? puncte.

color: red; - declarare unde color - proprietate, red - valoare

Mai multe declara?ii CSS sunt separate cu punct ?i virgul?, iar blocurile de declara?ii sunt înconjurate de acolade.

 

Exemplu
În acest exemplu, toate elementele <p> vor fi aliniate la centru, cu o culoare ro?ie a textului:

p {
color: red;
text-align: center;
}

css style sintaxa
Tags: sintaxa CSS Stil

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


analytics piwika