Yuav Tsim Cov Ntawv Qhia Li Cas Popup

Cov txheej txheem:

Yuav Tsim Cov Ntawv Qhia Li Cas Popup
Yuav Tsim Cov Ntawv Qhia Li Cas Popup

Video: Yuav Tsim Cov Ntawv Qhia Li Cas Popup

Video: Yuav Tsim Cov Ntawv Qhia Li Cas Popup
Video: Cob qhia menyuam li cas lawv thiaj tsim txiaj part 1, 2024, Kaum ib hlis
Anonim

Nrog kev pab los ntawm cov HTML code tsim nyog thiab cov cai CSS yooj yim, koj tuaj yeem tsim cov zaub mov pop-up, ntxiv rau nws thiab hloov kho. Los ntawm kev siv cov cascading cov ntxhuav thiab cov cuab yeej sau cov lus, koj tuaj yeem xyuas kom meej tias cov ntawv qhia zaub mov nws tus kheej ua haujlwm raug rau hauv txhua lub browsers.

Yuav tsim cov ntawv qhia li cas popup
Yuav tsim cov ntawv qhia li cas popup

Cov Lus Qhia

Kauj ruam 1

Tuav rau cov ntawv qhia zaub mov yooj yim thawj zaug. Tsim cov ntawv tshwj xeeb tooj nrog submenu hauv cov ntawv nyeem kho kom raug. Feem ntau "Notepad" siv rau cov laj thawj no. Cov submenu yog cov uas ua niam-txiv npe npe. Piv txwv li: Thawj ElementFlood ElementFlood Element2Field Element3Field Element4Field Element5

Kauj ruam 2

Khaws cov npe no hauv html cais. Tom qab ntawv tsim.css ntawv. Nkag mus rau txhua qhov uas yuav tsum tau ua los ntawm daim ntawv. Ua qhov no kom zoo zoo, vim tias ib qho yuam kev, thiab cov ntawv qhia zaub mov pop-up yuav tsis ua kom raug lossis tsis ua haujlwm hlo li.

Kauj ruam 3

Tshem tawm cov mos txwv thiab cov padding siv rau hauv cov ntawv teev npe. Teeb qhov dav ntawm cov ntawv qhia siv CSS cov cuab yeej: ul -style: tsis muaj; qhov dav: 200px; }

Kauj ruam 4

Khij qhov chaw txheeb ze ntawm txhua yam nyob hauv cov npe nrog tus cwj pwm hu ua txoj haujlwm: ul li: tus kwv tij; }

Kauj ruam 5

Tom qab ntawd npaj lub submenu, cov ntsiab lus uas yuav tshwm sim los ntawm niam txiv ntawv qhia rau sab xis thaum tus nas cursor dhau cov khoom: li ul: meej; sab laug: 199px; saum toj: 0; tso saib: tsis muaj; }

Kauj Ruam 6

Tus cwj pwm sab laug yog ib tug pixel tsawg dua li qhov dav ntawm lub tshuab raj nws tus kheej. Qhov no tso cai rau pop-up cov khoom yuav tsum tau muab tso rau qhov yog yam tsis tsim ob ciam teb. Cov zaub ntaus cim tau siv los zais cov submenu thaum qhib nplooj ntawv.

Kauj Ruam 7

Tus qauv sib txuas raws li xav tau siv cov kev xaiv css tsim nyog. Xws li cov zaub: thaiv parameter kom cov kab txuas coj mus rau txhua qhov chaw tshwj tseg rau lawv. Ua kom cov ntawv qhia zaub mov tshwm sim thaum tus nas cursor tau hovering dhau nws, sau cov cai hauv qab no: lis: yuj ul: thaiv; }

Kauj ruam 8

Teem cov kev xaiv ntxiv rau cov khoom siv npe thiab cov kev sib txuas raws li xav tau. Xws li qhov ntaus nqi rau hauv.html ntawv. Cov ntawv qhia pop-up yog npaj los siv.

Pom zoo: