ComputersSoftware

Yuav ua li cas muab thiab siv thauj tog rau nkoj HTML?

Niaj hnub no lub npe yuav Anchored HTML. Qhov no lub caij tso cai rau ceev ceev zaus tsis pub dhau cov nplooj ntawv, raws li tau zoo raws li nyob rau hauv lwm cov ntaub ntawv. Anchors yog feem ntau siv los ntawm web developers. Raws li lawv pab mus npaj ib tug yooj yim site rau cov txawj nyeem ntawv. Cov tsab xov xwm yuav tsum tau muab ib tug paub piav qhia txog ntawm no caij, thiab cov piv txwv ntawm kev siv.

piav qhia

Thauj tog rau nkoj HTML - nws yog zoo ntawm ib tug tshwj xeeb web page tab. Nws yeej ib txwm muaj ib tug neeg lub npe uas yuav tsum tsis txhob tau rov qab nyob rau tib page. Lub hom phiaj tseem ceeb ntawm ib qho kev thauj tog rau nkoj - ib tug ceev ceev txoj kev hloov los ntawm ib tug ib feem ntawm ib daim ntawv mus rau lwm lub, rau ib qhov chaw. Tshwj xeeb yog zoo no coj tau, thaum lub web page yog loj. Vim li no, cov neeg siv yooj yim rau kev nyeem ntawv tus txheem ntawm lub site. Thiab thauj tog rau nkoj nyob rau hauv ib tug HTML page tso cai rau ceev txoj kev hloov.

txoj hauj lwm

Yuav kom tsim tau ib bookmark rau ob tug sib txawv txoj kev yuav siv tau rau ntawm no. Tus thawj yog siv cov attribute lub npe, thiab nyob rau hauv lub thib ob cov ntaub ntawv, koj yuav tsum siv lub ID attribute. Tom ntej no, peb saib txhua txoj kev nyias. Cov kev hloov tshwm sim nyob rau hauv ob leeg los ntawm txhais tau tias ntawm «ib tug» lossis uas nws attribute muaj lub npe los yog ua qhia tau. Piv txwv li: «ib tug href = http: // kawm ntawv / tsab xov xwm / 106223 /% E2% 80% 9D # footer% E2% 80% 9D% C2% BB. Tus # lub cim qhia rau cov browser uas qhov link yuav coj Anchored.

Lub npe

Lub npe attribute no yeej tsim los tsim ib qho kev thauj tog rau nkoj rau ntawm ib sab. Nws nqi yuav ua tau tej ntawv nyeem. Qhov no HTML thauj tog rau nkoj yuav tsum tsuas yog siv nyob rau hauv nrog tag «ib tug».

Piv txwv li koj xav tau los ua ib tug bookmark nyob rau thaum xaus ntawm koj phab. Koj yuav tsum mus rau qhov chaw lub tag «ib lub npe =" footer "» «/ a» nyob rau hauv lub Desired ib feem ntawm ib tug web daim ntawv. Nyob rau hauv lwm qhov chaw ntawm cov nplooj ntawv koj yuav tsum tau tsim ib qhov txuas mus rau ib tug thauj tog rau nkoj, rau lub hom phiaj no, ntxiv ib qho kev nkag «ib tug href = http: // kawm ntawv / tsab xov xwm / 106223 /% E2% 80% 9D # footer" »link« / a ». Thaum koj nyem rau ntawm cov khoom no browser txiav yuav siv sij hawm koj mus hais tias ib feem ntawm cov ntaub ntawv nyob qhov twg muaj yog Footer tab.

ID

Ua ntej, peb hais tias ID - ib tug ua qhia tau hais tias muaj tsis muaj direct lub hom phiaj rau kev tsim anchors. Tab sis nws tso cai rau koj los mus tsim bookmarks nyob rau hauv tag nrho cov qhov chaw ntawm lub daim ntawv tsis tsim ntxiv mus. Hais tias yog, koj siv tau cov ID attribute rau tej HTML caij. Ces siv «ib tug» xa mus rau ib tug tag rau nws. Ntawm no yog ib qho piv txwv: lub caij «p» nyob rau hauv nruab nrab ntawm cov ntaub ntawv. Yuav kom mus rau nws los ntawm thaum pib ntawm cov nplooj ntawv tsis tau siv lub scroll tuav, ntxiv attribute ID: «p id =" centr "» «/ p». Ces ua ib qhov txuas: «ib tug href = http: // kawm ntawv / tsab xov xwm / 106223 /% E2% 80% 9D # centr% E2% 80% 9D% C2% BB% d0% A2% d0% B5% d0% BA% D1 % 81% D1% 82% C2% AB% 2Fa% C2% BB. Yog li, peb muaj ib qho yooj yim nkag tau mus rau tej feem ntawm cov ntaub ntawv. Tus nqi ntawm ib tug ID attribute yuav ua tau tej ntawv nyeem.

kev siv

Cov HTML link thauj tog rau nkoj yog heev feem ntau siv rau kev tsim kho ntawm lub navigation ntsuas. Piv txwv li, cov nplooj ntawv muaj ib tug lossis loj npaum li cas ntseeg cuav thaum ub ntaub ntawv, uas nyob rau hauv lem yog muab faib mus rau hauv nyias muaj nyias kev paragraphs los yog tshooj. Yuav kom cov neeg tuaj saib nws yog yooj yim siv ntawm qhov chaw, koj yuav hloov mus rau ib tug nyias muaj nyias ib feem ntawm cov ntaub ntawv koj xav muab ib tug bookmark. Yuav kom qhov no kawg, txhua tshooj tsim ib qhov txuas thauj tog rau nkoj, los yog siv lub ID. Ib tug sab saum toj navigation bar yuav ua li cas nrog cov ntsiab lus ntawm tag nrho cov kev mus. Ib tug interesting tseeb yog hais tias lub thauj tog rau nkoj yuav tau hais los ntawm lwm cov nplooj ntawv web. Nws yog txaus rau ntxiv mus rau thaum xaus ntawm cov kev siv tus nqi ntawm lub npe los yog ID cwj pwm. Tsis txhob hnov qab mus ntxiv lub cim #. Lub tswvyim yuav ces zoo li no: lub ntsiab link # npe (id).

xaus

Thauj tog rau nkoj HTML - nws yog heev pab tau thiab nyob rau hauv tej rooj plaub txawm tsim nyog caij. Nyob rau hauv no tsab xov xwm kuv tau hais tsuas yog ib qho piv txwv ntawm nws txoj kev siv. Tab sis nyob rau hauv qhov tseeb qhov no zoo ntawm bookmarks yuav siv tau nyob rau hauv ntau yam teeb meem. Qhov loj tshaj plaws - kom to taub lawv tswv yim yooj yim.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 hmn.unansea.com. Theme powered by WordPress.