Download as pdf or txt
Download as pdf or txt
You are on page 1of 40

Lwwosh, Natus

Dat- am
m
2023
CSS Basicd I
Ppeeuama
Sying Conttt

)Frmating ppeaa ?

-SS -Cascading Syl heut


ShhTo tu wdb pa
w e cucld fh
popuhes
u abaut appeouamea (uualL)

Selucwrs im CSS O
o way uing ich
we Cem t l u F a m

1) Simpl Seuctan elumem(S).


Eumunt Selnekan
chassSelactan
ID elecktan

2)suolo -claas Selicta


3 Multipu Suudor
Selldor

Color: tt 0%3e 4

2Ppeky Valu

( ELmemt Selkur
also Kman as
PP uatr
amdToq Seucka.
CSS Cem Selt
HTML elumums
Om
by uin
elamemFs Ftq name. A tuq mme
m m e ii t t
tuu
wrd(or chaneucta) b/w HTML mgl breclin
hamaR
hamely evey l o
prpalies presimt
DowmenF
mtar-

Coo JueA
2 Cla Selichrn

Umittd selucting olimemk by trigro


9reLuping Hhu tras .shyling

To Select am RTML elemumt by ts


Clas v&u CSS, a
peivcl () musb
Prependuel to Hu Class's nam

3 Clas wiu NOT Uniqu, aua

Exomple

P Coss ="9Yeem"> ABCp

Lp Uos: retm " ABcD LIP>

2P lass blu"> ABP LP>

Syus>
qvem
qreem

COLrblul;

1St
3)ID Setuce
Uiqu Seuctan.

Th delineaticn
is mada by sing (#) o
ApaAnt Om id

3 mdiuduual Styinq

butm id- "bulton "


Swsmi F </ bult

H butn

PundD -Closu

ucdy cleus a
R wrd acdicl Fo
P Sellchr hen Lam Cmanng o
a

he
Speias Stat a he Sithcted elamemt(s)

buuton Swbmut 2[huutom

buton have mauuik


Cerler : yeuew,
uhen
Cn he huttom
w
eua
Muliplu Selico
aAO Colllcl

lHiple Selecion o elenmums


examp
tabu, , ktdS

bovc: 1px Solid black


Lack,

How to adel S+yling to HTML

nin
: oouclcling
nmal
Css
xtonal

n l i r CSS

nlin CSS s applicd m


T
la

italic "> u l o u
p Styu- "hent -Stylu:

n l i n CSS

im openuyt
mmal CSS
we MLLSHle tr
Lwnih u itten heced 7 terg.
4 huael>

Sty

text -

Shodarw: 1px 1 px ttfFO000

Llhiercl
bocy
h1 hemal CSS appliel lhis

Llbody

E x t e a l CsS : -

we Create Sepernu CSS Fulu & HTML FL

CWmd thm ink o eaeh oua

ink uui ink elumemt in HT ML


elmemt y wmttem inide
Gnk

head
1SmBax |I
Jnk
Jal
"Sylshut "
E
StylcSs ndu.hhml
hu" StyuSs >
Spaic
teeLecr
(lc seuchY
SeltctY

inline (SS

pirmt Bec Tpruiu)

_Speit
To Claw)
CLoas

Id preuma

grine igh)
Tmprtemt i m p t u m t umeu

Onu Slu r uhww


p mt is wmten)

oi lass - "abc "


ic =ey "> kya haal ha eloiiv>

Color

Rxl -Sk:iteuk
hx S l itaue
ppueL
Box Modil im SS

Basi uilelung hlok CSs

ox
box Rma
mayhouw wichth, adlelingbvedwsl
mwnqLYy

MARGIN

BORDE R

widhn

Paold- CONTENT Aa
ig px

rer blw Bordn & Cemttmt mading


Ouker Sids o Bores Speeing mcangin

mangin = 1Opx
incuols au u , top batum)

in-t
monun- ngt
Spesilic
mangin- taP Sama
mnein- batom pcololin
Colars im CSS
w u ko oelel Calens

9Rexodiimai Cols ( g # OOffrf)


e) RGB eclesS Ceqqb ( 0),0,255)

(Kexudacimal
Ramy
L L L Od to ff
Ped reen B

roma
26S
nd ren bu

b ) gb mction
K

(3) predsinnd /Cvass brawsu Color


-

Namus

(140) pdeinnd colns


hy Name
Onits in CSs
(PX =4nc
96

) Absolut nite Cm

2) Percemtaq Unut Px hixd) ias


1 0 / . (fpersmterop o aumt
)Pelative Unit e nmt

() Releive to fomt &ze <

PeLaive ko Duumemt
Vm

mn Jalaive o pc nt elamamt n ze

1em 1X paunt Size.


div fx
ov 2

Fsize lem

1em =
1x 18
2 tm 2-x i8 9 6

m a l a t i e to ruet (reut u hml)


1w =
Xt6= i6px

idh ol viewp

ounLa)
haight o vieup t ((dispkoy oa)
wwwocha Notu Dets-10"Jan
223

CSSHnsicsI
,tramsams
(uodients, Shadaus, Poiioning
&FLxBox)
rediemt
Smoatn t a n i t i o n s / w
u Colors8
Colans.

ypu
U n n a (daun/upl p/igt/dligonally)

-Raeliad (Civu Cmtn)


Cconic Conical Aape)

racliem
) nua T*
bacua wd- imoge: inta - raoliemtReal, Bue)
i u Top to Dawn
Boeuult
teeigt),
to mgmt, Pid, B ) t to iqht
o yt, RLc, 5LL) > agh+ to uh
to op, Pd, Baktom to tap
DAgonaly Cho bakom Pit, PLo BA ) also leht
t o top Pizs Pd, 6uu ) a n i t
Dutioy n Linan yradliemt

Detcuult DiMion ( top o P cottom)


()pecih Diucion torg, to uht et et)
3) Angu (0d Recl, Buuu)
BcK)
4 Using tramupauney
to battom, ngba (25, 0,0, 0)
ba o, 0,055, 1)).
(Bu)
amspolmi
ies ron Oto 1)

it) Radial uadiemt -

bachcumd-imea.acial-radient
Rio, Bu, rramai ) ;
Stain Jenst

rop chamaing:
(Circh, Picl, Bluu, oramu)
1
ShoupA
hama
pcamtea:-

y e i a 57. , trrama 107., u d 507.)


hadaus

Tex Pox
haolad Shadouuw
(Chodaw im Bar)
S1 adaw in

toxt-Stadaw Box-ghadouw

Text hadouw

3px 3px 3px Aiel


text- &hosleuw :

Colar
hovzotal vericou
dy tac aistetu adow

ou cui gthodouw = t x t Cales

Kox &hadau
Haizomeer
> vekca

Box adouw 10px 1Opx 1Opx


y o h a l t Ethodew = text Calor

el, Caolerod

haleud
Box-&rodeuw 16px oPx IOPx Aud

we Con alao add mutpa FA


BoX ShaoloLd
ug -W Valuy u e cam Chema hu
olinction o Shouolonuw
K

SppAead-Raciuy in Box-Sacdouw
H/w

3) ummsion propuies
1) iolth

eHigtt
( Min- huignt ught
4 Min - uwidthn

() Max- heigh
Max - i d h n .

Mar-huight-
max- huignt iy 500f
C o n e n t ercnelly 500pa Hhen tu
Contem w i u g e k s s e wiU q t caut
h u Div. (OnpLaw)
a)

w them Div wiu hamq i t z e and

adst
n Contem > 5opx (overhl)
Hauw to hamelle owahleuw 2
Overhlceuw Scal
Min-huignt
J hugmt
Cortemt u y Hham min
div.
b inid h
ut wiu
oliu bAr.k

Contrt 94ts bigqm, Hu


wil automaically becom
becm
Lana
Sam Sizze
blerk
mereast
Sze
blork.
Conttmt>

Cverhlue pp
Valu:
wnm kov big
isibu
2) Hiolodsn

3) Seva blark ammativg9


4 Auto
Cmtt

ueahlaw visibu By duhouuut)


i g b u Contnt s m avehleuw
m bo
vehlow: iolelsm
L oveleuw Comeut H

gweahloar
ow:Svalu
Screlliny ellauc wm yean contmt

eouuw: Alto
depnely On Comtm+
ntion propey:.
poihonung rmehoo

) Stuhe (dut) an n eAmimt

rm ik n r m a
2) Puahve acltsle uway
poition. (tPigm/ToP/battom
3) Fixud fixid ploco m Serrceel
4) Ab salult
stiorid alcine o Hu
5Stic min pcoitioud Qimunsew
"hno pcoLihomal amas toa it
u r d odoummt hery o

ron wig Stche


R U e e to n m a paition -3 Plahe
Fined even i t Serau Fixel

Absoluk peasitionue elsmums aw Jumaveel


m the nemmal e w , & Cam uerlop
elumums .

A scolut mavs alng uuth Sorally


doruumt booy u i n o meutn

Shc peihonnd baud on tha vuy


Sru paithi on.
toggis b/u alakie 4 Pixes,
depemoin m u Scoalu pc>ai ion
i pautiond aulalive umil a
tem
h perition iu met im tu
Viewpa.
5 2D thaniama
alaw au toomcue, natatt
& Skenw olamies
Cal

Tn m pnputy muhherchA
) banlatt ) 5) Scnls ()
9) Metix )
2 Artu ) 6) Skeux)
3) Scadu x ) 7) Shw Y)

4) Stale YO e) Skuwl)

* amlatu ():- Mawemint)


ansham tamiladu (100px, 2 00fk) ;
Kaus Y-Caxis
Aark ()

emam hotak 6dag);

* Scale ) : - zooming)
rms
Scale 2, 3
Houzntal berical
Seaun
Slalir
V e Cam al&o n 4 e clucim a l Valund hi

Ca:(1-5)

SKuw ) : - (Tt )

tramsam
Suw ( 2o dug)
)3Dansam
D
Sam opuahon wrt 3D
3 rus

/samt
S p
a m popaies will 3 axis:
wwash Natu Dat:-12h Jan
2023
CSS BASICS IL
+FlexBox_
way o t a Eluxibility u
eu
Jayauh to simpli pOmiio oyaru
olesigm
ma ky teaAy o align elumins m
C2D pleme

3 4t 4D Aayaut modil wmu


a

we tam olo
Spece dis hibuion b/ w
emm, i m paaul alimumt
Capmlilities.

Fux Box

Spack aliemumt
D mbuion Capabilities
maun OR

axis
P O m - Chld
alahion im lxbox

mun uxis Poaent Conkuinu | fRex


div

Crco
Oxs

ChildFLex ikms
( u t d elumm
i n i o pamt Contuinn)

pouhoning tick

) Block
2)Jnine
S S Pasi hon proprry
4 fabi
FAx Box (Imp)

Foa m r a k i n g F u x .

CSS i s play: lax


ut houny hauzomtal to
by d a u l t
Veaical

Fux - olinuction: alumn


vnhica)
x - intior Aauw
Chaizonmkal)
Fo AveAsA we Ae
Fx- dlimctien ' Colu m- JAvru,
Fluy - dianchen : Aaw -ANversA

Fox -wreyp wYaP;


thy malu Hu wiolh adio imtac
oum ued
duteunE naurmp V
oma vauy
uy alto'>uopaNeAL
tix- Contuinu prDputies
1) fux -diudion
ColwY
2) wrap
Col m-J ers
mO-uWTP
3 Fux - wwrep- JANsA

4) Jausiy- eonttm
5) elign- ittms
6) A g - Conttnm

Fx -

COmunu PrOp y
msAcd ho penmt elununt

fun- itm opan


nucl Per ruskd/ child
F items.
FLax Cmtin pmprties

1) Fex - olinucHon

lAR - i e c t i m nao-ANeIA

F odinetiom: Ccolu m
Eax - ouacHion (COLu m - Jwerst

2) Fux -

wrer

FAR wYep: wrap -nuNALA

3 Fx -Elaw Shaat hamd matuhon)

we com aold flx olinnion Ex uw p


Un
fux- Lew: Jaw
wYcp

4)Tb Cmknt

oliqm Contem UN main axis

jn Y- ( onumt: hux-Sfcot (Leht end)


n ó Spe
Justil -Lommt: uk emod
Pi end)
juhlg Conttmt: Centu
e g

j s t i l Comurt: $pooc -Uauumal (Spau bluw


: $f¢eaual packv) temns
euau
SpocinN)
Oimmem m

5 ALtqn-items Crss axis)


veaicay

cligm- itmms Fux -Sttat,


alum-Hms: Fux
algm 1 t m (omtea

aligm- i t n n : Sretch; (d ult)


augn-tms hosslino

Uoppirg blu elemums//boxuy

p 1OPK;
p Sharthomd mcaskaion

calu m

6) um-Cmmemt-

homdling Spacing b/w row


ol bbru
align- Comtmt FlAx a lut-

-Cmtmt FlIx emd


aliqn
clign - comttmu CAmtCa
pact-bitweim
olim- Cortnt
- C n k r t S p e u -n a u r d

Contnt : pace ene


-

y
tagm-
Ax -flem propaie
Orod
e) FAex -g7rw qual widh 2 qu
to e l i m m t V
Spacs
3 Fux -
shrnk 4 i n k Spend (Sqauuzirg)
4 FAex - basi Ld Cer i r g uiclHn
s)
6) u x au ubae propArty m Single ins

) Aim- suly

Put im r d u uuth valuy

tox1
0rdn 3

2) FUx -9rau
FALx- vcw 1:
This propirky au Pev giuing Spac Fo

elumum
FUx
Fla- Shink (y olycuult-1)
Shiink Specel usmm Squzea
Jeyet
4 FX-bas'
flex basis; 10 Opx
a paHuleyy
width vS FLx-basiu
Uiclh o m
OuwrploAd
C mt mere osis

1idelm Cnmt
Fx bosiu na kuy IE
Pesponsive
5FAx
JsL u wme all
pmopeHes
PrOpees
Singu in
Croun, F l -q w, FLx Shink Fx beuis
ou_in ome
FLex 3
2 120px 1
) Aim-

Cu m- Suh : Shretch

Fx-emad
FX Start
Cemta
eY eaey R elumunu
ewey
PaalluK-webtik -

preluk Ebbct
angl fra
Sput o oblanmt okjecs t4

oliAnmt , that enetapaaaiuy eHet


moom uitm L e u Srewng
O
Builoirg uit
Spu Seralli

Caa
s t we co-uelep imaa

T h n , e g u o l imo nea
Baclpmd imeu fen (3-Dehlsct)
Thm hm ue wu SCralU
On WU

wl mo
t
w e l n Akuty
A
Datt:-14 Jm
2023

S-Basies4
Css nict-

A gsid is a calltetiom a hoizontal&

Uetice ines CYeahn9 a pateam guina


LLsich e cam ne up un dluign eummy

't aws2 alumm,ap


s2D layeut
T A Mectrix
Cal L Cel2 Col 3

Paw 13

RcL 2 P

almY
ep
-Box 1P
Flx >

2D
F rmicd a u m

md- kmplau- Colums psos 3, FY);


V
Con o4o b wnt m
n 1F 1Fr 1 Fr

This uoms

u e Cm oulso e
valuu im p_ixel
160P 250pa 2

for uicd Raw

gil tmplat -rws: Apat l4, 1 fr),


4Himy
diuiclel
P op im rid

ap 1S px;

nu- Basue-Placamut.
1 9d- Calum
-ste
2) gmid-Calummn -emol
mied raw-SFru
+ 9 e l - a w - emd

5 hothomo pmpuiespid-ruw, gmel-coLumn


riol-aLa.
Some more Properties
- Cowt Shu-aei
3a-a
ayn - t o t
aln-itos
pha-it
paea-se
ON
N
The
Aepperky peioies a paahiuuloy
Se uA Oalrm Hmat a
na km tupe, 1
m itselh wih (SS
uppued to t
Tr
eg
e

uua 1/2/3/ 3
icl-tmplats auo
md- templati -arum an Hu
mme ws &
openy usd ho

St ks
altumns oa qrid t

Joyaat. t CcOuol lexoe JGk hiy4


Continu
displey i gne-aua : hol
md- tmplatu- talumny
3 oopk 300px
30Opx
ma tmplatu- rcaus
2 5opx 60o

md templatu -aua
hd hel hol hd hd hd hd hd"
Sod SA Sd
main man maun maun muin
fA F f f ft ft ft
namu
Lelcling
for aoldi ng4:
heis
nd-aud hd
nol-tmuplto
Workng

ReL Cal1 Caul 2


hd

Aaw 2 Se

AQw3 F

thi hao
moming y okon

A ustun gie valuu


thet oupies h
SpC amudl
tt huodlu {
9nd -Oaue: hel
wewe hae
Aaun 4 Calummy
A
Clginue im a u i d
Oupy hel SpLe
C a m nama himm i t h
nel +empla- anue)
thwm ive narr odaka lbox)
hon dinrd hat wiu

happim o mu exha
boxy
Thuyauoll wiu
SqAUL ze below
Contuino
( o
wMm SS) Wr
wmp /dapmp nou} mon
mo rd
snumd rouq mb »pnuu'
hmoyrwrsa (6
rmrb onpmu voaH
Tguo)
pm no s r Pr no rorrb omon (
wrs wn PMHuO qom Ypmm
mwoum M4 v o mL od an
(hruanmuadrd)
uowmo pinm qbaM Mouan
-wPm owayo}mAM
pus. rorde
pub: mardmp
p : od me nu hnsn bq h u s o p
xdoo6 Pm -Xpuu)
pwe Ydoo9 : HPIm-unu) pgnu9
pnkrm (
Luwoh's Na N
at 19 Jam
2023
Animaiers n CSS

CSS Shy 1 o CSS Shyl 2


grcLelual Chema t u m
Celucl Aimakons

umcions im CSS

off
Fonetom
piu o Oc ole we + C u t p u t
wun ne qie J n a u o itE

1/r paamouy

A
Scau), trenstaku ()qruelicmt
gba ) , Jwll), minmax ) 2k et.

Naw.-
Math fumctio u CSS:

CaleCouc () (fr wielttn)


TO scale expsaion (t-,*, I ee)
ue hu valuuu

Conlulnu

Ox
1 2 0 0 - 20o
= 1 0 0 0 Px
Cal (Loo7. -

20oPx)

200 p
Cal
,
paundvaluu Expnssion Vall )
L e u (1007 200 P)

min (Fer uichm)


max fer widlm)
munmax
( prouidy rane b/w
un
n o maxi m m
max

Variabls CSSS:
wsun a u heue a Aone bleclcoy Ccrlu leqgut)

yu wownt cacld Styly, biut ahin


L wcmt to heumaSyla u n em

wuialls yuu
Cem
erge cu vau om
Sing place.
nalblus wnks only iniolo tn0
Blorls. ushumU drlnn l o olly
whum uinblu us doclannd Jm
h
crot Hem alse it wil wwk

-donu-md HI9la20.

A 9Aebally dsninucd vcuial


Cenm be nsnd amyunn

Connteunu

--olenu - auel: H 991a2 C

loTal vanialbll
mly ba unsid

i i n blorks
Scope

oba ora
Uwualu Nauab

elummk
Spei
Climumt
Nauw Fnol o blw

thumalhons°
mutons u CSS $-

1)Tamsiion iming (dunotian


)cmuion cHom
3Ivuion Deloy hm o uui
4) lomution Propeny. Cn uaweh poprty
apfPy Hanmuhom

e con unnat am eels n a i two


Propeie

TranAition mmtiony
Fropany
omaihon propy
hanihon horthamcl 1opea

e s i v Cal
amsihien by-col ( 4s
bruitim olslaiy
dureian
tim mchon n
Cctoict
V

niHn propai
Ppey T YumuHon 1enuion
Tiu

Arrvrahon opuay 2 knhramy ?-


i e propieAmit tu lass yuu
wcwmd to h a e camimaHon
Thun o m CmumaHUn
W eykwms me

Po
Ownuoion -m m
Ovmuyreon d ion
Ou cion -

IUeion (Co -

mt
PrPHy

owwmotiom hming- meHion inuol

Ommotion duley
Omumotion - diucion
Oumotion - i l l m o r

You might also like