Yuav Ua Li Cas Hloov Xim Ntawm Cov Hau

Cov txheej txheem:

Yuav Ua Li Cas Hloov Xim Ntawm Cov Hau
Yuav Ua Li Cas Hloov Xim Ntawm Cov Hau

Video: Yuav Ua Li Cas Hloov Xim Ntawm Cov Hau

Video: Yuav Ua Li Cas Hloov Xim Ntawm Cov Hau
Video: peb yuav ua cas Youtube thiaj nce sai , yooj yim 2024, Kaum ib hlis
Anonim

HTML (HyperText Markup Language) muab rau (6) cim npe tshwj xeeb rau kev ntsuas cov ncauj lus ntawm qib sib txawv. Txhua tus ntawm lawv muaj qhov tsis xws luag (qhov loj thiab cov qauv ntawm daim ntawv sau, qhov nyiaj ntawm qhov pib los ntawm cov khoom dhau los thiab tom ntej, thiab lwm yam). Cov kev xaiv no tuaj yeem thim rov qab siv cov lus qhia CSS (Cascading Style Sheets) thiab yog li hloov qhov tsos ntawm cov kab hauv cov ntawv ntawm nplooj ntawv web.

Yuav ua li cas hloov xim ntawm cov hau
Yuav ua li cas hloov xim ntawm cov hau

Cov Lus Qhia

Kauj ruam 1

Tso cov npe ntawm ntau qib sib txawv ntawm cov coj qhib thiab kaw cov cim npe, yog tias tseem tsis tau ua tiav rau hauv qhov chaws ntawm nplooj ntawv web. Piv txwv, cov nqe lus tseem ceeb tshaj plaws (thawj theem) yuav tsum nyob nruab nrab ntawm cov ntawv

thiab

:

Thawj theem qib

Cov theem tseem ceeb hauv qab no yuav tsum tso ntawm cov pib

thiab

lwm yam. Qhov kawg ntawm qib foreseen yog qhov thib rau -

thiab

Kauj ruam 2

Qhov chaw hauv qhov chaw nyob sab hauv cov cim (ntawm cov cim thiab cov cim npe) ib nqe lus qhia rau tus qhua tus browser tias muaj cov lus piav qhia txog cov qauv hauv CSS hauv qhov chaw no:

/ * CSS cov lus qhia yuav nyob ntawm no * /

Kauj ruam 3

Hauv nruab nrab ntawm tus qhib thiab kaw cov style cim npe, ntxiv cov lus piav qhia style rau cov kab ntawm txhua qib uas koj xav kom hloov qhov zoo ntawm. Piv txwv li, yog tias koj tsuas yog yuav tsum hloov pauv qhov tshwm sim ntawm thawj qib qib taub hau, tom qab ntawd cov cai no yuav zoo li no:

h1 {

xim: Liab;

font-loj: 20px;

font-style: italic;

font-yuag: bold;

paj tau paj-saum: 30px;

npoo-hauv qab: 20px;

}

Ntawm no, h1 qhia tias qhov kev piav qhia hauv curly braces yog hais txog h1 tag thiab yog hu ua "tus xaiv". Lub parameter xim teeb xim ntawm cov ntawv nyeem, font-loj parameter yog qhov loj me, font-style nrog cov nqi italic yog cov ntawv hom italic, font-nyhav nrog tus nqi bold yog bold, npoo-saum yog sab saum toj cov npoo, thiab cov npoo-hauv qab yog cov hauv qab npoo. Rau qib ob qib kab lus ntxiv, ntxiv cov block zoo sib xws nrog h2 xaiv, thiab lwm yam.

Kauj ruam 4

Siv cov ntawv cim luv yog tias muaj ntau qib qhia. Piv txwv li, cov lus piav qhia font tuaj yeem tso rau hauv ib qho ntsuas, nrog rau cov lus piav qhia ntawm cov khoom siv me me. Qauv:

h1 {

xim: Liab;

font: bold 20px arial;

cov npoo: 30px 0 20px 0;

}

h2 {

xim: Txiv kab ntxwv;

font: bold 18px arial;

cov npoo: 25px 0 15px 0;

}

Hauv cov kab npoo, tus npoo yuav tsum tau hais kom tiav raws li moos ntawm lub vias, pib los ntawm cov npoo saum toj kawg nkaus, dhau ntawm qhov chaw seem (sab saum toj sab hauv qab sab laug).

Pom zoo: