Yuav Ua Cas Thiaj Ua Underscore

Cov txheej txheem:

Yuav Ua Cas Thiaj Ua Underscore
Yuav Ua Cas Thiaj Ua Underscore

Video: Yuav Ua Cas Thiaj Ua Underscore

Video: Yuav Ua Cas Thiaj Ua Underscore
Video: peb yuav ua cas Youtube thiaj nce sai , yooj yim 2024, Hlis ntuj nqeg
Anonim

HyperText Markup Language (HTML), uas yog siv los tsim cov nplooj ntawv web, muab cov txhais tau tias kev nkag siab ib feem ntawm cov ntawv nyeem. Feem ntau cov lus siv rau kev piav qhia cov hom phiaj xwm (CSS - Cascading Style Sheets) kuj tseem siv rau qhov no.

Yuav ua cas thiaj ua underscore
Yuav ua cas thiaj ua underscore

Cov Lus Qhia

Kauj ruam 1

HTML muaj qhov cim npe tshwj xeeb uas tsim los kos kab hauv cov ntawv qhib () thiab kaw (). Hauv nws daim foos yooj yim tshaj plaws, ib feem ntawm nplooj ntawv nplooj ntawv uas siv cov qauv kab hauv qab no yuav zoo li no: qhov no yog kab hauv qab

Kauj ruam 2

Ib qho ntxiv, hauv txhua kab ntawm inline lossis block nplooj ntawv lub ntsiab, koj tuaj yeem hais kom meej ib qho kev ntaus nqi hu ua style thiab muab cov lus piav qhia ntawm cov ntsiab lus style hauv nws. Lwm cov qauv lus piav qhia suav nrog cov ntawv sau hauv qab. Hauv css, cov lus piav qhia hauv qab cov kab ntawv hauv qab zoo li no: kho kom zoo nkauj ntawv: kos kab hauv qab;

Tag nrho cov pawg ntawm cov kab hauv qab

Kauj ruam 3

Txawm li cas los xij, cov lus piav qhia style tsis tshua tso rau hauv cov HTML kab ntawv; lawv feem ntau tso rau hauv cov lus piav qhia cais. Cov kev thaiv zoo li no tau muab tso rau hauv lub taub hau ib feem ntawm cov ntaub ntawv hauv web (nruab nrab ntawm thiab cov cim npe) lossis khaws tseg rau hauv cov ntaub ntawv sab nraud nrog css txuas ntxiv. Rau tag nrho cov ntawv ntawm nplooj ntawv yuav tsum khij hauv qab, cov lus piav qhia no yuav tsum tau muab tso rau sab hauv ib qho kev xaiv HTML:

html {ntawv-kho kom zoo nkauj: kos kab hauv qab;}

Tab sis qhov no tsis tshua muaj neeg xav tau, yog li ntau lub npe ntawm ib chav kawm tau teev tseg hauv kev xaiv. Piv txwv li:

.und {ntawv-kho kom zoo nkauj: kos hauv qab; xim: Liab}

Nws tshaj tawm tias cov ntawv hauv sab hauv txhua qhov cim npe uas tau muab rau hauv chav kawm ntawv und yuav tsum yog xim liab thiab khij hauv qab. Feem ntau cov feem ntau, cov chav kawm rau ntau cov ntawv nyeem raug siv ua ke nrog cov kab ntawv luv. Piv txwv li, cov cai HTML rau cov kab lus ntawm cov ntawv nrog ib feem hauv qab yuav zoo li no:

Kab lus ntawv nrog ib qhov hlais ntawm qhov sau dub

Pom zoo: