Documente Academic
Documente Profesional
Documente Cultură
pe scurt ...
CUPRINS
Definirea selectorilor
Selectorii HTML pot fi definiti prin adaugarea unui numar de definitii compatibilie cu eticheta HTML la care se refera,
avand urmatoarea forma generala:
selector_HTML { proprietate1:valoare1; proprietate2:valoare2; ... }
Dupa redefinirea etichetei HTML, stilurile etichetelor respective din documentul HTML vor fi modificate automat.
Prin redefinirea unei etichete, proprietatile prestabilite existente nu sunt anulate, ci se adauga altele noi.
Utilizarea selectorilor de tip clasa ofera posibilitatea configurarii unor stiluri care se pot aplica doar acelor elemente
care sunt etichetate cu clasa respectiva. Sintaxa generala de definire a unei clase CSS este:
.nume_clasa { proprietate1:valoare1; proprietate2:valoare2; ... }
Exista cazul in care o clasa este asociata unui selector HTML, ceea ce inseamna ca acea clasa poate fi folosita doar cu
eticheta HTML respectiva. Pentru a defini o clasa care sa afecteze in mod direct un anume selector HTML, se
foloseste urmatoarea sintaxa:
selector_HTML .nume_clasa { proprietate1:valoare1; proprietate2:valoare2; ... }
Selectoarele de clasa sunt acceptate de toate navigatoarele. Numele unei clase e recomandat sa fie diferit de
cuvantele rezervate JavaScript.
Asemanator cu selectorii de clasa se definesc si identificatorii (id-ul). Acestia sunt folositi pentru crearea de stiluri
care pot fi atribuite unei singure etichete HTML dintr-o pagina. Sintaxa generala de definire a unui identificator este:
#identificator { proprietate1:valoare1; proprietate2:valoare2; ... }
Identificatorii permit definirea unui element sub forma unui obiect, fiind folositi doar o singura data in cadrul unei
pagini web pentru identificarea tag-ului respectiv, astfel poate fi manipulat si cu ajutorul functiilor JavaScript.
Numele unui identificator e recomandat sa fie diferit de cuvantele rezervate JavaScript.
CODURI CSS
Fundal
Proprietate
background
background-attachment
background-color
background-image
background-position
background-repeat
background-clip
background-origin
background-size
Descriere
Seteaz toate proprietile de fond ntr-o singur declaraie
Stabilete dac o imagine de fundal este fixa sau ruleaza cu restul paginii
Seteaz culoarea de fundal a unui element
Seteaz o imagine de fundal pentru un element. background-image: url('--------.---');
Seteaz poziia de pornire a unei imagini de fundal
Seteaz modul n care o imagine de fundal va fi repetat
Specific zona de pictura de fundal
background-clip: border-box|padding-box|content-box;
Specific zona de poziionare a imaginilor de fundal
Specific dimensiunea de imagini de fundal
Borduri
Proprietate
Descriere
border
Sets all the border properties in one declaration
border-bottom
Sets all the bottom border properties in one declaration
border-bottom-color
Sets the color of the bottom border
border-bottom-style
Sets the style of the bottom border
border-bottom-width
Sets the width of the bottom border
border-color
Sets the color of the four borders
border-left
Sets all the left border properties in one declaration
border-left-color
Sets the color of the left border
border-left-style
Sets the style of the left border
border-left-width
Sets the width of the left border
border-right
Sets all the right border properties in one declaration
border-right-color
Sets the color of the right border
border-right-style
Sets the style of the right border
border-right-width
Sets the width of the right border
border-style
Sets the style of the four borders
border-top
Sets all the top border properties in one declaration
border-top-color
Sets the color of the top border
border-top-style
Sets the style of the top border
border-top-width
Sets the width of the top border
border-width
Sets the width of the four borders
outline
Sets all the outline properties in one declaration
outline-color
Sets the color of an outline
outline-style
Sets the style of an outline
outline-width
Sets the width of an outline
border-bottom-left-radius
Defines the shape of the border of the bottom-left corner
border-bottom-right-radius Defines the shape of the border of the bottom-right corner
border-image
A shorthand property for setting all the border-image-* properties
border-image-outset
Specifies the amount by which the border image area extends beyond the border
border-image-repeat
Specifies whether the image-border should be repeated, rounded or stretched
border-image-slice
Specifies the inward offsets of the image-border
border-image-source
Specifies an image to be used as a border
border-image-width
Specifies the widths of the image-border
border-radius
A shorthand property for setting all the four border-*-radius properties
border-top-left-radius
Defines the shape of the border of the top-left corner
border-top-right-radius
Defines the shape of the border of the top-right corner
box-shadow
Attaches one or more drop-shadows to the box
Dimensiuni
Property
height
max-height
max-width
min-height
min-width
width
Description
Sets the height of an element
Sets the maximum height of an element
Sets the maximum width of an element
Sets the minimum height of an element
Sets the minimum width of an element
Sets the width of an element
Font
Property
font
font-family
font-size
font-style
font-variant
font-weight
Description
Sets all the font properties in one declaration
Specifies the font family for text
Specifies the font size of text
Specifies the font style for text
Specifies whether or not a text should be displayed in a small-caps font
Specifies the weight of a font
Description
Used with the :before and :after pseudo-elements, to insert generated content
Liste
Property
list-style
list-style-image
list-style-position
list-style-type
Description
Sets all the properties for a list in one declaration
Specifies an image as the list-item marker
Specifies if the list-item markers should appear inside or outside the content flow
Specifies the type of list-item marker
Margini
Property
margin
margin-bottom
margin-left
margin-right
margin-top
Description
Sets all the margin properties in one declaration
Sets the bottom margin of an element
Sets the left margin of an element
Sets the right margin of an element
Sets the top margin of an element
Spatiere (padding)
Property
padding
padding-bottom
padding-left
padding-right
padding-top
Pozitionare
Description
Sets all the padding properties in one declaration
Sets the bottom padding of an element
Sets the left padding of an element
Sets the right padding of an element
Sets the top padding of an element
Property
bottom
clear
clip
cursor
display
float
left
overflow
position
right
top
visibility
z-index
Description
Specifies the bottom position of a positioned element
Specifies which sides of an element where other floating elements are not allowed
Clips an absolutely positioned element
Specifies the type of cursor to be displayed
Specifies the type of box an element should generate
Specifies whether or not a box should float
Specifies the left position of a positioned element
Specifies what happens if content overflows an element's box
Specifies the type of positioning method used for an element (static, relative, absolute or fixed)
Specifies the right position of a positioned element
Specifies the top position of a positioned element
Specifies whether or not an element is visible
Sets the stack order of a positioned element
Tabel
Property
border-collapse
border-spacing
caption-side
empty-cells
Description
Specifies whether or not table borders should be collapsed
Specifies the distance between the borders of adjacent cells
Specifies the placement of a table caption
Specifies whether or not to display borders and background on empty cells in a table
Text Properties
Property
color
direction
letter-spacing
line-height
text-align
text-decoration
text-indent
text-transform
unicode-bidi
vertical-align
white-space
word-spacing
hanging-punctuation
punctuation-trim
text-align-last
text-justify
text-outline
text-overflow
text-shadow
text-wrap
word-break
word-wrap
Description
Sets the color of text
Specifies the text direction/writing direction
Increases or decreases the space between characters in a text
Sets the line height
Specifies the horizontal alignment of text
Specifies the decoration added to text
Specifies the indentation of the first line in a text-block
Controls the capitalization of text
Sets the vertical alignment of an element
Specifies how white-space inside an element is handled
Increases or decreases the space between words in a text
Specifies whether a punctuation character may be placed outside the line box
Specifies whether a punctuation character should be trimmed
Describes how the last line of a block or a line right before a forced line break is aligned
when text-align is "justify"
Specifies the justification method used when text-align is "justify"
Specifies a text outline
Specifies what should happen when text overflows the containing element
Adds shadow to text
Specifies line breaking rules for text
Specifies line breaking rules for non-CJK scripts
Allows long, unbreakable words to be broken and wrap to the next line