Vous êtes sur la page 1sur 5

<p style="color:red; font-size:20px; text-align:center;"></p> Aseazare <style> p{ margin: 0px; padding-left: 10%; padding-right: 10%; text-align: justify; border-style:

dashed; border-width: 1px; border-color: orange; } p {letter-spacing:12px; text-decoration:overline; text-transform:uppercase; text-align:justify; text-indent:20%; line-height:20px; } span{background:green; } </style> Posibile valori:
letter-spacing: [normal | 5px] text-decoration: [none | underline | overline | line-through] text-transform: [capitalize | uppercase | lowercase | none] text-align: [left | right | center | justify] text-indent: [5px | 5%] line-height: [normal | 5px | 5%]

body>p (pentru a apela fiul) border: [style] [width] [color]; You can do something similar with the top, right, bottom and left declarations for margin and padding:

padding: [top] [right] [bottom] [left]; Notice that it starts at the top, like the hour-hand at noon, and goes clockwise all the way around. If you want all sides to be the same, you can shorten it even more: margin: [all-four!] If the horizontal sides are the same (left and right) and the vertical sides are the same (top and bottom), you can use this format: margin: [vertical] [horizontal]

<link rel="stylesheet" href="style.css" />

(in head)

<span> is in line with the text, and <div> is blocked out like a box text-indent (alineat) Apelarea unui elemnt dintr-un id: #parent p:first-child{ Diferite apelari si importanta li {z-index: 1;} ul li {z-index: 2;} #DontForgetMe {z-index: 100;} .lookatme {z-index: 10;} #header.blue p {z-index: 111;} <h2 style="z-index:1000;"></h2> z-index:-5; Apelarea primul fiu si a ultimului fiu. p:first-child{ background:green; } p:last-child{ background:green; } face ca elementul sa treaca pe sub elementele cu grad mai mare de importanta

Apelarea unei clase cu mai multe nume .son.father (daca erau 2 clase ar fi fost .son .father) <div class="son father"> Apelarea unui element dintr-o clasa sau tag div > p {} ul.duck>li {} ul este din clasa duck ul.duck>ul>li {} pentru a apela un element din dintr-un tag dintr-o clasa Selectarea tuturor elementelor de un anumit tip dintr-o pagina ul * {padding:0px; margin:0px} poate fii folosit pentru a elimina toate alineatele si marginile descendentilor tag-ului ul

Cand mai multe tag-uri au aceleasi proprietati h1, h2, h3, h4{ line-height: 1.1em; margin: 0 0 .5em 0; } Float Using float, you can tell an element to wrap left or right in respect to other elements. float: left; Text Shadow text-shadow: 0px 2px 2px green; Pentru a se deschide intr-un nou tab target="_blank" tr:nth-child(odd) {background-color:red;} face elementele tr de pe pozitii pare sa aiba culoarea backgroundului rosie

Content: The actual element (like text) Padding: The space around the content, but still inside the element Border: Sits between the margin and the padding Margin: The space outside of the element

Taguri in CSS:
Asezarea in pagina margin:15px margin-top:15px margin-bottom:15px line-height: 57px; margin: 10px; list-style-type:none Border border-style: dashed; border-width: 1px; border-color: orange; padding:10px Scris: text-indent Afisare: display:inline; CSS3:
-moz-border-radius: 3px; /* Mozilla */ -webkit-border-radius: 3px; /* Webkit */ border-radius: 3px; /* W3C */

pune spatiu liber 15 px stanga dreapta sus jos pune 15 px fata de paragraful din sus pune 15px fata de paragraful din jos pune 57px intre elemente(chiar ale aceasi clase) pune o margine de 10px face sa nu mai apara niciun semn la liste neordonate imprejmuieste cu un chenar din puncte tagul grosimea chenarului este de 1px culoarea chenarului este oranj pune 10px distanta de la chenar la text(poate fi si padding-top, etc) alineat

il afiseaza ca un element inline;bun pentru a strange chenarul in jurul scrisului

(adauga o cutie cu colturi rotunde ;trebuie luate toate 3) box-shadow: [left] [top] [blur] [color]; merge si pentru text-shadow

Background: color:red

culuoarea fondul este rosu

background-repeat: no-repeat; pune ca background imaginea o singura data(daca era repeat o punea pe tot parcursul tagului) background-position: top left; pune background in stanga sus background-image:url(http://hosturl.co.uk/cc/gs.png); pune ca background imaginea de la acel

link div{color:red !important;} face culoarea rosie chiar daca pentru div este scris ca el sa fie de alta culoare

Pseudo clase :hover :before {content:x;} :after {content:y;} :first-child :last-child Afisare position:fixed;

este accesata cand mouse-ul este deasupra elementului adauga x la inceputul tagului adauga y la sfarsitul tagului

sectiunea ramane pe ecran indiferent chiar daca dai scroll alte valori:absolute,relative

Positioning position:relative; top:10px; left:10px; Clearing clear:both

(muta 10px fata de cea de sus) (muta 10px fata de cea din stanga) (pune noua clasa sub subsolul ultimei rubrici)

Vous aimerez peut-être aussi