Lub peev xwm ntawm qhov cim lus - HTML - thiab cascading style ntawv - CSS - tso cai rau koj tso ib qho duab nyob rau lwm qhov hauv ntau txoj kev. Yog lawm, qhov no yuav tsum muaj qee cov kev txawj hauv cov nplooj ntawv web page, thiab koj yuav tsum xaiv ib txoj kev tshwj xeeb raws cov cai uas twb muaj lawm. Txawm li cas los xij, nyob hauv qee kis, koj tuaj yeem ua yam uas tsis tau kho los ntawm qhov chaws.
Cov Lus Qhia
Kauj ruam 1
Muaj txoj hauv kev los tso ib qho duab rau lwm qhov tsis muaj kev hloov pauv ntawm cov nplooj ntawv ntawm lub xaib. Ua qhov no, nws txaus los kho cov duab keeb kwm yav dhau los khaws cia rau ntawm tus neeg rau zaub mov - siv cov duab editor los tso rau cov duab foreground rau nws. Yog tias cov qauv no ua haujlwm rau koj, pib los ntawm kev txhais cov chaw khaws khoom thiab cov npe ntawm cov ntaub ntawv keeb kwm yav dhau los. Qhov no tuaj yeem ua tiav los ntawm nrhiav nws nyob rau hauv qhov chaw ntawm nplooj ntawv lossis los ntawm qhib nws hauv kem cais thiab saib tag nrho txoj hauv kev chaw nyob ntawm qhov browser.
Kauj ruam 2
Siv tus thawj tswj hwm cov ntaub ntawv ntawm cov txheej txheem tswj hwm lossis tus neeg siv FTP, rub daim ntawv xav tau rau koj lub khoos phis tawm thiab qhib nws hauv txhua cov kab ntawv piav qhia - piv txwv, hauv Daim Ntawv Thov Xim tau nruab nrog Windows.
Kauj ruam 3
Muab cov duab foreground hla lub keeb kwm yav dhau - hauv Xim rau qhov no koj yuav tsum xaiv "Sau los ntawm" yam khoom los ntawm "Ntxig" sau rau ntawm daim ntawv "ntawm" Tsev "tab thiab nrhiav cov ntawv xav tau nyob hauv cov lus qhib uas qhib. Tom qab ntawd kho qhov chaw ntawm lub suab tso rau ntawm keeb kwm yav dhau los (rub nws nrog nas) thiab txuag qhov tshwm sim (Ctrl + S).
Kauj ruam 4
Thauj rov qab daim duab kho kom raug, rov ua dua daim qub. Qhov no ua tiav cov txheej txheem.
Kauj ruam 5
Cov txheej txheem piav qhia tsis yooj yim nyob rau hauv rooj plaub thaum lub tso duab yuav tsum tau hloov ntawm lub sijhawm. Tom qab ntawd siv lub peev xwm ntawm cov HTML lus - piv txwv li, ua cov duab tom qab ntawm nplooj ntawv keeb kwm nyob rau hauv uas cov duab foreground yuav muab tso rau. Xws li lub taub ntim khoom tuaj yeem yog, hais, ib txheej (div). Txhawm rau ua kom loj ntawm cov duab nws keeb kwm yav dhau, koj yuav tsum siv cov ntawv piav qhia style - tus qauv ntaus cim ntawm div div. Lub khoob ntim hauv HTML code yuav zoo li no:
Hauv kev thaiv kab tshoob, taw qhia qhov chaw nyob thiab lub npe ntawm cov duab keeb kwm yav dhau los ntawm koj lub xaib.
Kauj Ruam 6
Tsim cov cim duab ntawm thaj chaw (img) cim, siv tib tus cwj pwm cwj pwm kom teeb tus nqi ntawm lub ntsuas phoo los ntawm cov npoo ntawm cov thawv tom qab. Piv txwv li:
Ntawm no, qhov dav thiab qhov siab tau teeb tsa qhov ntev ntawm daim duab, thiab plaub tus lej tom qab lub padding qhia tias padding hauv pixels los ntawm cov npoo ntawm lub thawv, pib rau sab saum toj (50) thiab txuas ntxiv moos (60 - sab xis, 70 - hauv qab, 80 - sab laug).
Kauj Ruam 7
Muab daim img tag rau hauv lub thawv:
Kauj ruam 8
Ntxiv cov kab tsim rau cov kab ntawv ntawm nplooj ntawv, thiab tom qab ntawd, hloov kev nkag mus, kho qhov chaw ntawm cov duab ntxig tiv thaiv cov duab keeb kwm yav dhau los.