Cov txheej txheem:

Yuav ua li cas hover nyhuv hauv bootstrap?
Yuav ua li cas hover nyhuv hauv bootstrap?

Video: Yuav ua li cas hover nyhuv hauv bootstrap?

Video: Yuav ua li cas hover nyhuv hauv bootstrap?
Video: Полный процесс обертывания и прикрепление режущей наклейки к кабине галопа 2024, Hlis ntuj nqeg
Anonim

Cov lus qhia

  1. Kauj ruam 1: Tsim ib wrapper muaj cov chav kawm. saib.
  2. Kauj ruam 2: Ntxiv ib chav rau cov nyhuv koj xav rau siv (piv txwv li. overlay los yog.
  3. Kauj ruam 3: Teem ib txoj kev rau daim duab.
  4. Kauj ruam 4: Ntxiv cov chav kawm.
  5. Kauj ruam 5: Yog tias koj xav tau rau ntxiv ib co ntawv, koj ua tau siv chav kawm.

Tsis tas li ntawd, dab tsi yog hover effect?

Hover effect tsuas yog ib qho kev hloov pauv (xim, qhov loj, duab, duab thiab lwm yam) ntawm qee lub caij thaum koj tso tus nas xub rau nws. Feem ntau nws ua tiav nrog CSS coding. Cov hover effect tsis yog cranky tag nrho thiab tuaj yeem siv tau zoo rau txhua yam CSS.

Ib tug kuj yuav nug, ua li cas koj hover CSS? Qhov: hover selector yog pseudo-chav kawm uas tso cai rau koj tsom mus rau lub ntsiab lus uas tus cursor lossis nas pointer yog hover dhau. Nws yog ib qho nyuaj rau siv cov: hover xaiv ntawm cov khoom siv kov. Pib hauv IE4, tus: hover selector tsuas tuaj yeem siv nrog cov cim npe. Txij li thaum IE7, lub: hover xaiv ua tau siv nrog txhua yam.

Tsis tas li ntawd nug, kuv yuav ua li cas ua ntawv hover ntawm ib daim duab?

Yuav ua li cas tso saib cov ntawv Animated Tshaj ib daim duab ntawm Hover siv CSS3 nkaus xwb

  1. Tsim HTML¶ Ntxiv koj cov duab siv

    tag thiab ntawv. Ua ntej, koj yuav tsum ntxiv koj cov duab siv lub

    tag.

  2. Tsim CSS¶ Teeb:hover selector. Cov nyhuv ntawm hover yog teem siv: hover pseudo-chav kawm uas xaiv thiab styles lub caij.

Yuav ua li cas kom tshem tau ntawm hover?

Txhawm rau lov tes taw cov nyhuv hover, kuv tau txais ob lub tswv yim:

  1. yog tias koj cov nyhuv hover tshwm sim los ntawm JavaScript, tsuas yog siv $. unbind('hover');
  2. yog tias koj hover style yog triggered los ntawm chav kawm, ces tsuas yog siv $. removeClass('hoverCssClass');

Pom zoo: