Yuav Ua Li Cas Teev Cov Keeb Kwm Yav Dhau

Cov txheej txheem:

Yuav Ua Li Cas Teev Cov Keeb Kwm Yav Dhau
Yuav Ua Li Cas Teev Cov Keeb Kwm Yav Dhau

Video: Yuav Ua Li Cas Teev Cov Keeb Kwm Yav Dhau

Video: Yuav Ua Li Cas Teev Cov Keeb Kwm Yav Dhau
Video: Huab tais LOOJ lub vaj loog - Keeb kwm 2024, Hlis ntuj nqeg
Anonim

Txhawm rau ua kom koj lub vev xaib nyob hauv Is Taws Nem, koj tuaj yeem hloov pauv ntawm nws tus qauv. Hloov cov qauv siv cuam tshuam nrog txhua yam kev ua, los ntawm kev hloov cov keeb kwm yav dhau los ntawm nplooj ntawv tseem ceeb los mus hloov kho lub xaib tus qauv. Yog tias koj txiav txim siab hloov tom qab ntawm koj lub xaib, tom qab ntawv qhia hauv qab no yuav pab hauv kev daws qhov teeb meem no.

Yuav ua li cas teev cov keeb kwm yav dhau
Yuav ua li cas teev cov keeb kwm yav dhau

Tsim nyog

Kho cov ntawv css

Cov Lus Qhia

Kauj ruam 1

Rau feem ntau, lub vev xaib tsim qauv nyob rau hauv cov ntaub ntawv style.css. Tab sis txhua daim nyias nyias yuav txawv ntawm yav dhau los, yog li ntawd tus qauv tsim qauv tuaj yeem nyob hauv cov ntawv sib txawv, tab sis kuj nrog css txuas ntxiv. Txhawm rau tsim xim tom qab ntawm koj lub xaib, koj yuav tsum nkag mus lossis hloov tus nqi tam sim no nrog rau cov lus qhia hauv qab no: / * dawb tom qab * / lub cev {

xim tom qab: #FFFFFF;} / * dawb lub npe keeb kwm yav dhau, xim dub xim * / h1 {

xim: # 000000;

xim tom qab: #FFFFFF;

}

Kauj ruam 2

Txhawm rau ntxig rau ib qho duab raws li keeb kwm yav dhau los ntawm koj lub xaib, koj yuav tsum nkag mus lossis hloov cov nqi uas twb muaj lawm nrog rau qhov hais tawm hauv qab no: lub cev {

xim tom qab: # 000000;

cov duab tom qab: url ("Image-1.jpg");

}

Nws yuav tsum raug sau tseg tias qhov no nws yog qhov tsim nyog yuav tsum tau muab cov ntawv txuas rau cov ntaub ntawv duab, uas yuav nyob hauv tib lub tais nrog cov ntawv css.

Kauj ruam 3

Yog tias koj xav muab cov pobzeb duab lossis cov duab me me, tom qab ntawd siv cov lus rov qab tom qab. Txhawm rau siv cov lus txib no kom raug, muaj ntau txoj kev hloov kho rau cov lus txib no:

rov tso tom qab: rov tso-x - rov ua cov duab raws x axis;

rov tso tom qab: rov tso-y - rov ua dua cov duab raws y y;

rov tso keeb kwm yav dhau los: rov ua dua - rov ua dua ib daim duab nrog ob kab sib luag ib zaug;

rov tso tom qab: tsis muaj qhov rov ua dua - daim duab tsis rov ua dua;

tso saib tom qab: kos - scrolling daim duab ua ke nrog cov nplooj;

Symptoms keeb kwm yav dhau: tsau - cov duab tsis yog scrolled.

Siv cov syntax ntawm cov lus txib no, koj tuaj yeem qhia tias nws ua haujlwm li cas hauv kev ua piv txwv:

tom qab-txoj hauj lwm: 30px 40px - Daim duab yog 30 pixels nqis los rau sab saud thiab 40 pixels los ntawm sab laug rau sab xis.

tom qab-txoj hauj lwm: 60% 35% - Sab laug padding yog 60% thiab padding sab saum toj yog 25%.

Pom zoo: