Qhov feem pua hauv CSS yog dab tsi?
Qhov feem pua hauv CSS yog dab tsi?

Video: Qhov feem pua hauv CSS yog dab tsi?

Video: Qhov feem pua hauv CSS yog dab tsi?
Video: Tshuaj theem vim li cas thiaj tau nqi ?/ Siv kho mob dab tsi?/paris polyphylla use for? 2024, Kaum ib hlis
Anonim

Qhov < feem pua > CSS hom ntaub ntawv sawv cev a feem pua tus nqi. Nws feem ntau yog siv los txheeb xyuas qhov loj me raws li qhov txheeb ze ntawm lub ntsiab lus niam txiv khoom. Ntau yam khoom siv tuaj yeem siv feem pua, xws li qhov dav, qhov siab, npoo npoo, padding, thiab font-loj.

Ua li no, kuv yuav tsum siv feem pua hauv CSS?

Lwm yam uas yuav tsum tau xav txog yog pixels thiab feem pua rau fonts. Nov yog kuv txoj cai ntawm tus ntiv tes xoo: Yog tias koj tab tom tsim lub vev xaib nrog feem pua , siv feem pua rau cov font, rau cov laj thawj ntawm kev ua kom proportions raug. Yog tias koj tab tom tsim lub vev xaib nrog pixels, siv pixels rau font.

Tsis tas li, nqe lus dab tsi zoo tshaj plaws piav qhia txog feem pua ntawm cov txiaj ntsig hauv CSS? Nws yog ib feem ntawm lub tus nqi uas tuaj ua ntej nws. Nws yog qhov tsawg tshaj plaws tswj tau ntawm qhov screen. Nws ib txwm yog qhov dav ntawm qhov indent.

Ib sab saum toj no, peb puas tuaj yeem muab qhov siab hauv feem pua hauv CSS?

Cov qhov siab cuab yeej teev cov qhov siab ntawm ib yam. Cov qhov siab ntawm ib lub ntsiab tsis suav nrog padding, ciam teb, los yog margins! Yog qhov siab yog teeb rau tus nqi tus lej (xws li pixels, (r) em, feem pua ) ces yog tias cov ntsiab lus tsis haum nyob rau hauv qhov teev qhov siab , nws yuav dej ntws.

Dab tsi yog qhov txawv ntawm PX thiab feem pua hauv CSS?

Pixels ( ib px ): Pixels yog cov chav nyob ruaj khov uas siv hauv cov xov xwm tshuaj ntsuam (piv txwv li yuav tsum tau nyeem ntawm lub computer screen). Cov ntsiab lus muaj ntau yam zoo li pixels , nyob rau hauv hais tias lawv yog tsau-size units thiab tsis tau scale nyob rau hauv loj. Feem pua (%): Cov feem pua chav tsev zoo ib yam li chav tsev "em", txuag rau ob peb yam tseem ceeb sib txawv.

Pom zoo: