Cov txheej txheem:

Yuav ua li cas thiaj ua tau ib qho thaiv hauv CSS?
Yuav ua li cas thiaj ua tau ib qho thaiv hauv CSS?

Video: Yuav ua li cas thiaj ua tau ib qho thaiv hauv CSS?

Video: Yuav ua li cas thiaj ua tau ib qho thaiv hauv CSS?
Video: Yuav caiv li cas thiaj tsis muaj me nyuam thaum yus npaj tsis tau txau thiab tsis tau xav sib yuav 2024, Kaum ib hlis
Anonim

A thaiv lub caij ib txwm pib ntawm kab tshiab, thiab sau cov kab rov tav qhov chaw sab laug thiab sab xis ntawm nplooj ntawv web. Koj tuaj yeem ntxiv cov npoo thiab padding ntawm tag nrho plaub sab ntawm ib qho twg thaiv element - saum, sab xis, sab laug, thiab hauv qab. Qee qhov piv txwv ntawm thaiv element yog ib

tag.

Hais txog qhov no, ua li cas koj ua ib qho thaiv hauv HTML?

Thaiv cov ntsiab lus tshwm ntawm qhov screen zoo li lawv muaj ib kab tawg ua ntej thiab tom qab lawv. Piv txwv li, th

,

,

,

,

,
,

,

,

,,

thiab cov ntsiab lus yog tag nrho thaiv qib theem.

Dab tsi yog qhov txawv ntawm block thiab inline block? Ntxiv thiab, nrog zaub: hauv kab - thaiv , sab saum toj thiab hauv qab margins / paddings yog hwm, tab sis nrog zaub: hauv kab lawv tsis yog. Piv rau zaub: thaiv , qhov loj txawv yog qhov screen: hauv kab - thaiv tsis ntxiv kab-tawg tom qab lub caij, yog li lub caij tuaj yeem zaum ntawm lwm cov ntsiab lus.

Kuj nug, block CSS yog dab tsi?

Thaiv -level Elements A thaiv -theem lub caij ib txwm pib ntawm kab tshiab thiab coj mus rau qhov dav dav muaj (ntev tawm mus rau sab laug thiab sab xis kom deb li deb tau). Lub ntsiab yog a thaiv - theem element.

Puas yog BR yog cov khoom thaiv?

Nws tseem tsis tau tshwm sim nyob rau hauv nws tus kheej zoo li ib tug thaiv txheej , tab sis tsuas yog tsim kom muaj kab tawg. Yog li BR yog inline keeb . Raws li HTML 4.0 Strict DTD: yog a thaiv - theem keeb thiab < BR /> yog inline keeb.

Pom zoo: