Qee lub ntsiab lus ntawm nplooj ntawv hloov pauv lawv qhov pom ntawm hovering nrog nas - qhov no yog los ntawm lub luag haujlwm rau lawv los ntawm cov chaw ntawm cov lus HTML (HyperText Markup Language - "Hypertext Markup Language"). Cov lus no muaj cov cuab yeej uas cia koj hloov chaw tib yam rau lwm nplooj ntawv. Yog tias tsim nyog, koj tuaj yeem siv ob qho CSS (Cascading Style Sheets) thiab tus neeg siv sab JavaScript sau tau cov lus rau lub hom phiaj no.
Cov Lus Qhia
Kauj ruam 1
Siv cov style ntaus cim kom muaj peev xwm teev tus naj npawb ntawm tus cursor ntawm nplooj ntawv web nplooj ntawv yam khoom rau koj. Piv txwv li, HTML code ntawm lub chaw nkag sau cov lus qhia uas qhia tus qhua tus browser hloov pauv cov tsos ntawm tus chij li tib yam li thaum hovering hla ib qhov txuas, tuaj yeem sau zoo li no:
Kauj ruam 2
Xaiv cov yam ntxwv pom zoo los ntawm daim ntawv teev npe ntawm qhov tseem ceeb rau tus cursor parameter Hauv qhov ua piv txwv qhia nyob rau hauv kauj ruam dhau los, tus nqi ntawm pointer siv - tus nqi ntawm txhais tes tau ua tib yam nkaus. Ntxiv rau ob lub txiaj ntsig no, cov kev xaiv hauv qab no rau kev pom ntawm tus chij tau muab: crosshair, e-resize, pab, txav, n-resize, ne-resize, nw-resize, kev nce qib, s-resize, se-resize, sw-resize, cov ntawv nyeem, w -resize, tos. Piv txwv li, ua kom tus chij zoo li tus taw qhia ob sab taub hau los ntawm sab saud sab sauv mus rau sab xis txoj cai hauv tus qauv saum toj no, siv nw-resize tsis txhob siv lub pointer:
Cov tsiaj ntawv nyob rau hauv pem hauv ntej ntawm lub nqi loj yuav pab txiav txim siab seb cov lus qhia cov xub tau los ntawm cov nqi no - lawv, zoo li nyob rau ntawm lub koob taw qhia, sib haum nrog cov qauv ntawm cov ntsiab lus cardinal. Piv txwv, nw sawv nord-sab hnub poob (qaum teb qaum teb), s rau qab teb (qab teb), thiab lwm yam.
Kauj ruam 3
Siv cov ntawv URL hloov ua qhov kev txiav txim siab ua ntej yog tias koj upload koj tus kheej tus duab cursor hauv nws cov hom cur ib txwm. Ua li no, siv cov ntawv cim hauv qab no:
<tswv yim style = "tus ntawv qhia: url (https://someSite.ru/someCursor.cur) "/>
Yog tias cov ntaub ntawv nyob hauv daim nplaub tshev qub nrog nplooj ntawv lossis hauv subfolder, tom qab ntawd es tsis yog qhov chaw nyob meej, koj tuaj yeem qhia tus neeg txheeb ze.
Kauj ruam 4
Siv onmouseover attribute yog tias koj xav hloov cov tsos ntawm tus chij siv JavaScript. Piv txwv li:
Txoj cai no yuav ua haujlwm zoo ib yam li cov qauv hauv theem ob.