Yuav Hloov Pauv Cov Deb Li Cas Ntawm Cov Lus

Cov txheej txheem:

Yuav Hloov Pauv Cov Deb Li Cas Ntawm Cov Lus
Yuav Hloov Pauv Cov Deb Li Cas Ntawm Cov Lus

Video: Yuav Hloov Pauv Cov Deb Li Cas Ntawm Cov Lus

Video: Yuav Hloov Pauv Cov Deb Li Cas Ntawm Cov Lus
Video: Cov Lus Qhuab Qhia | “Tus Cawm Seej Yuav Cawm Noob Neej Li Cas Thaum Nws Los?” 2024, Kaum ib hlis
Anonim

Hloov qhov kev ncua deb ntawm cov lus hauv cov ntawv ntawm cov nplooj ntawv web tsis yog tsis tseem ceeb uas nws yuav zoo li. Ob, peb lossis ntau qhov sib law liag ntawm cov lus nyob ib sab, raws li HTML qauv, yuav tsis cuam tshuam qhov kev ncua deb ntawm lawv hauv txhua txoj kev - browser yuav tso saib lawv li ib qho chaw. Tab sis, tau kawg, muaj cov cuab yeej los daws cov teeb meem no.

Yuav hloov pauv cov deb li cas ntawm cov lus
Yuav hloov pauv cov deb li cas ntawm cov lus

Cov Lus Qhia

Kauj ruam 1

Ib qho kev xaiv yog siv cov cim HTML tshwj xeeb hu ua tsis-sib tawg-chaw. Nws raug tso tawm tib txoj kev ntawm qhov chaw tsis tu ncua, thiab lub peculiarity yog tias yog ob lo lus los sib cais los ntawm qhov chaw tshwj xeeb no, ces browser yuav txiav txim siab tias qhov no yog ib lo lus ua ke, uas tsis tuaj yeem sib cais. Vim tias cov yam ntxwv no, lub browser yuav tsis cuam tshuam nrog cov zaub ntawm ob peb qhov chaw zoo li hauv kab, i.e. yuav tsis hloov ntau qhov chaw nrog ib qho. Qhov paib tshwj xeeb no yog txhais los ntawm cov cim hauv qab no: "& nbsr;" (tsis muaj npe). Hauv cov txheej txheem ntawm daim ntawv, ib pawg lus ntawm cov ntawv nrog cov lus sib cais los ntawm cov cim tshwj xeeb tuaj yeem saib zoo li no:

Nov yog tus piv txwv & nbsr; & nbsr; pawg lus & nbsr; & nbsr; & nbsr; ntawv nyeem.

Ntawm no qhov kev ncua deb ntawm thawj lo lus thiab lub thib ob yuav zoo li qub, nruab nrab ntawm thib ob thiab thib peb - ob npaug, thiab nruab nrab ntawm peb thiab plaub - peb npaug.

Kauj ruam 2

Kev siv ntau tshaj plaws yog tswj kev sib nrug ntawm cov lus siv cov lus piav qhia hom (CSS). Hauv CSS cov lus, cov lus txhais tau yooj yim yuav zoo li no: lo lus-sib nrug: 15px; Ntawm no yog qhov loj ntawm qhov chaw ntawm cov lus nyob ib sab hauv 15 pixels. Koj tuaj yeem ntxiv cov style ntaus nqi rau yuav luag txhua daim cim npe. Piv txwv li, ib kab lus nrog daim ntawv ntaus cim no, uas teeb tsa qhov ntev ntawm 20 pixels ntawm txhua lo lus hauv nqe lus, tej zaum yuav zoo li no:

Cov pawg lus hauv kab ntawv nrog qhov sib txawv ntawm cov lus

Kauj ruam 3

Feem ntau, cov style thaiv tau muab tso rau hauv cov ntawv sau ntawm cov ntawv lossis hauv cov ntaub ntawv cais. Hauv kev thaiv zoo li no, koj tuaj yeem tsim ob peb qhov muaj nuj nqis rau qhov kev ncua deb ntawm cov lus thiab ntim lawv mus rau hauv cov chav kawm sib txawv, thiab hauv lub cev ntawm daim ntawv qhia kev sib txuas rau cov chav kawm uas sib haum hauv cov cim npe. Piv txwv li, ib qho kev piav qhia ntawm chav kawm muaj npe dblSpace yuav zoo li no:

.dblSpace {lus hais-seem: 20px}

Thiab ib kab lus tag nrog cov ntawv txuas rau hauv chav kawm no hauv lub cev ntawm daim ntawv yuav yog, piv txwv li, zoo li no:

Cov kab lus nrog cov lus dav dav

Pom zoo: