Kev sib pauv tswv yim ntawm koj lub xaib yuav rub cov mloog ntawm cov neeg siv thiab nce tsheb. Ua kom muaj lub taub hau rau lub vev xaib yog tsis nyuaj li nws zoo li thaum xub thawj.
Cov Lus Qhia
Kauj ruam 1
Cia peb sim ua tus muaj lub ntsej muag ua cim, uas yuav hloov nws lub teeb tsa thaum tus nas cursor hovering dua nws. Piv txwv li, daim duab xim dub-dawb hauv lub duab taub hau raug hloov pauv mus rau xim thaum sib cuam tshuam lossis hloov mus rau lwm tus.
Kauj ruam 2
Nruab lub tsev qiv ntawv jQuery hauv koj lub computer tom qab rub tawm ntawm lub vev xaib official (jquery.com).
Kauj ruam 3
Txuas lub tsev qiv ntawv rau koj cov ntawv html ntawm lub taub hau cim npe siv cov ntawv sau:
Kauj ruam 4
Xaiv ob daim duab uas yuav hloov rau lwm tus thaum tus neeg siv cuam tshuam nrog lub header. Yog tias koj xav kom muaj kev hloov ntawm xim dub thiab dawb mus rau xim, tom qab ntawd tsim daim ntawv theej thiab pom nws hauv Photoshop.
Kauj ruam 5
Tsim cov npe ntawm ob yam hauv html-daim ntawv thiab muab cov duab rau txhua tus uas siv daim duab cim npe. Piv txwv cov chav kawm style rau daim ntawv nws tus kheej, piv txwv li
Kauj Ruam 6
Ua qhov no hauv div uas yog lub luag haujlwm rau koj lub xaib qhov chaw. Ua ntej tshaj tawm lub chaw nyob ntawm daim duab uas yuav tsum tau xav txog hauv lub xeev zoo li qub, thiab tom qab ntawd ib qho uas tshwm rau yuj.
Kauj Ruam 7
Ntxiv hoob = "pervaya" rau thawj daim duab, thiab chav kawm: "vtoraya" rau daim duab thib ob.
Kauj ruam 8
Hauv cov ntawv css uas txuas nrog, qhia meej qhov tso kiag rau cov khoom (txoj haujlwm: meej;), qhov siab thiab qhov dav (qhov siab thiab dav) rau cov chav kawm no.
Kauj Ruam 9
Txheej cov duab rau sab saud. Siv z-Performance index rau qhov no. Nws tso cai rau koj dlhos cov khoom raws z-axis, uas ploj mus ntawm peb hauv qhov tob ntawm lub vijtsam.
Kauj ruam 10
Rau cov npe nws tus kheej, qhia meej qhov indentation, sib ncag koj xav tau thiab tshem tawm cov npe khoom (teev hom-hom-hom: tsis muaj;).
Kauj ruam 11
Tsim ib.js tej ntaub ntawv thiab muab cov cai nram qab no tso rau hauv nws:
$ (daim ntawv).ready (muaj nuj nqi () {
$ ("img.grey"). yuj ua (ua haujlwm () {
$ (no).stop (). animate ({"opacity": "0"}, "qeeb");
}, ua haujlwm () {
$ (no).stop (). animate ({"opacity": "1"}, "qeeb");
});
});
Kauj ruam 12
Txoj cai no yuav ua rau koj lub siab rau ua ub ua no. Tsis txhob hnov qab mus cuag cov ntawv.js rau cov ntaub ntawv html.