Per noi i diritti sui contenuti sono una cosa seria. Se sospetti che questo contenuto sia tuo, rivendicalo qui.
Formati disponibili
Scarica in formato PDF o leggi online su Scribd
Sei sulla pagina 1/ 16
CSS TLilrndtuetion
What A cas?
ASS tants de Cascading Gly le Sheets
CSS clesevtiva how ELTML elements arte to be
Aisplayest on Geveen
DW om combol layout 4 molt ple pages all
at ones,
“External syle sheets ave stored in Ces (ite:
\N hy use CSS 7
Te ls ued +o Aefine | yous web
Pog oe the design loy out andl Van'achong
in display {s afferent devices and coveen
Sl2e4-
CSS Suntax
A ess qule consists :( a selector andl
declaration block.
ht t Coley 4 blue 7%
rae
selector py party HasSelectora WK CSS
PCS elector selects the HTML elementiy
You want to style:
1- Simple Selector,
1. Elemayt elector
2+ Claws, Selector
3. ID Selector
2+ Psvelo- claw Selector
3. Multiple Selector
El ement Selector
CSS element elector elects HTML
clement, basel on the element name.
b& fe
tact align! cortey
color: rel ;
y
Clans Selector
The class Selector’ welects HTML elementa
vorth a sect {ie claw attribute.Jdddé
/
CCL dd
To select elements wth a specifte. class,
Write a period) ehavacter, followed by
the claw name.
Ex. center {
y
colev: vel}
ID Selector
=> The ID selector used the td atheibute an
HTML clementa to select a specific elemerst.
eee lg tal 4 an element ts onique within a
Page, 0 the td elector is uaed to select
one unique element!
=> To Select an element! with a specific tol
t t
Write a hash (ay character, fotteweot by the
id 4 the element.
bx th bewat ¢
color vad:
olor svcd;
z
Psvedo—clarse Selector>
SS
A pseudo -~clas to a Keyworol added +2 a
Selector that specifies a special Stote “4
the selected elementls) -
For example :
ae Style an element when a vaser hovers
the cormor over it -
Ae Ghyle visttel and unvistoled links
differentty .
sSiyurto ny,
Selector: pseudo—clas §
property y value;
4
Muldipte Selector” | (strouping Selector
A qrovblg selector ceelects all the berm.
elements with the came style olafinttons.
Tt will be better to fe the Selector,
fo minimize the coole:
To group selectors , » Seperate — each ~
Selector with o G) comma.Ex ht, hoa, pt
color; ved;
y
Exploration Time (Hw)
“E Universal Selector
+ Nestel Selector
Attribute Selector
Universal Selector
The universal selector (4) selects all HT™ LL
elenents on the page.
& +f
color : rel 3
j
Nested Selector
Just Uke in HTML where You can : have
elements neoteol tnaide other elonents,. the
same can be done in Css.
SiokcClastusele clawrasele idsele of
Properly c value j
\
Ge. doble + th ¥ f
beckprourel color: rely
f
Attribute Selector
The Cattibvier Selector is sel do select
elements whtty a specifteoh attrilout,.
Ge a Chasey el ¢
botckg round color: yellow j
4X
How to adel styling in UTML 7
*e Inline Css
a Tuternl O88
*K Eetemal 0.85
Thine CSS
tin am Sam fam ttm tie im itm i im ii ik ih ia fm mca a ka=> To etyle an HTML elemert-, you tan adel
the style otthrilute. directly to the senting
=> To ° use” intine Styles, adol tre style attribute
to the ‘televart -eme element.
=> Online styles should be avoided at all costs
becawse Yt makes tb Imporsile to a Her Shylea
to an actemal stylesheet:
cx
Lam Rishabh
itemal CSS | Style a
An. iwtemal style sheet may be vdeol 4 one
Single H™L Poge hos a Unique Style.
ATMEL alllows us to write C&S codle inside
the