Hauv InternetWeb Tsim

Image Manager - img lossis

Daim duab no tsis yog cia li muab tso rau hauv cov ntawv. Qhov browser tau qhia nws lub npe thiab qhia tias qhov twg thiab yuav tsum npaj li cas ntawm qhov screen. Ua li no, siv ib qho HTML-tag nrho img. Nws qhia txog qhov chaw ntawm cov duab nraaj ntawm lub vev xaib.

Yog hais tias muaj ntau yam cim npe rau cov cim npe tsis yog hauv txoj cai, ces tus img lossis yuav tsum muaj tsawg kawg yog ib qho parameter - qhov chaw nyob. Qhov attribute no hu ua src:

  • - qhov chaw no yuav tso tawm cov ntaub ntawv goat.jpg, uas yog cia rau hauv cov directory tam sim no;
  • - nrog qhov kev ntsuas ntawm img tag, qhov browser yuav download tau cov duab tso tawm hauv Internet ntawm megasellmag.ru.

Tus lej sib dhos

Rau cov duab tso rau ntawm nplooj ntawv siv HTML, cov img lossis siv, cov cwj pwm uas yog lub luag hauj lwm ntawm qhov tso cov duab ntawm nplooj ntawv thiab qhov ntawm nws cov ntawv nyeem.

Yog lub neej ntawd, lub browser muaj cov duab nyob rau hauv qhov chaw ntawm lub screen, thiab cov ntawv nyeem wraps nyob ib ncig ntawm nws tsis yog. Lub img lossis tag yuav cia Qhia koj qhov kev tsis pom zoo nrog qhov browser siv cov yeeb yam sib npaug.

- daim duab yuav nyob ntawm sab laug ntawm nplooj ntawv, thiab cov ntawv nyeem yuav muab txuas rau sab xis.

Tus cwj pwm ntawm cov ntawv nyeem yuav zoo ib yam li cov duab hauv qhov xis (align = right), hauv nruab nrab (align = nruab nrab), saum (align = top), hauv qab (align = bottom) thiab center (center).

Indentation thiab loj tsis

Tias cov ntawv tsis tau nkag ntawm cov duab, lossis lossis img tau tshwj xeeb Ntaus -hspace (horizontal / horizontal fields) thiab vspace (vertical / vertical fields), uas txiav txim siab npaum li cas ntawm cov ntawv nyeem ntawm qhov sawv ntawm cov duab hauv pixels.

Daim duab yuav tsis tsuas mloog lus tawm ntawm cov ntawv nyeem los ntawm cov lus teev tseg, tab sis nws tseem yuav txav deb ntawm ntug ntawm nplooj ntawv, yog li nws yog qhov zoo dua kom tsis txhob muaj qhov loj ntxiv.

Tseem ceeb heev yog cov duab qhov ntev ntawm cov duab, uas tsis tsuas yog ntshaw, tab sis qee zaus tsuas yog yuav tsum tau qhia rau qhov tseeb ntawm daim duab. Ua li no, qhov dav thiab qhov siab yog qhov teeb tsa, qhov nqi ntawm qhov teev tseg hauv pixels los feem pua.

Yog hais tias koj qhia tsuas yog lub dav, qhov siab yuav raug muab piv nrog cov thawj cov khoom. Qhov ntev muab nyob rau hauv feem pua, cia tso tus duab nyob rau hauv rau sab xis ntawm cov nplooj ntawv, tsis hais txog ntawm lub qhov rais me me ntawm lub browser, xws li qhov yuav tsum tau tshwm sim feem ntau.

Lwm yam tsis

Ciam teb tus ciam cuam tshuam cov duab hauv daim duab ntawm daim ntawv teev lus tuab, uas qhov browser tsis yog vim.

Tus ncej yuav muaj qhov tsis tseem ceeb (zero = '0'), tab sis qhov no yog txog thaum cov duab ua ib qhov txuas thaum qhov browser yuav nrhiav tau nws nrog xaj ciam teb, tsis tas tos cov lus qhia.

Qee cov neeg mob siab ceev, tsis zoo los ntawm kev qev hauv Internet, tsuas yog muab cov duab tso tawm. Ntawm no rau cov rooj plaub no muaj kev pabcuam pub dawb, tso cai rau nkag mus rau lwm phau ntawv uas tus neeg siv yuav pom nyob rau hauv lub vib voos nyob qhov twg hauv daim duab uas maj mam thauj.

Yog tias koj tsis nyiam qhov kev xaiv qis dua, daim img tag yuav pab tau Qhov ntev ntawm tus ntxhuav, tus nqi ntawm qhov yog qhov URL ntawm daim ntawv nrog cov lus piav qhia ntxiv.

Cov cwj pwm peb daim ntawv qhia thiab ismap qhia rau tus browser tias daim duab yuav yog daim duab uas tus hyperlink yog ib thaj chaw (daim ntawv qhia kev siv), tsuas yog tus usemap parameter qhia txog daim ntawv qhia kev qhia rau tus neeg rau zaub mov, thiab ismap yog daim qhia kev ntawm tus neeg mob.

>

Nqe lus piav txog qhov txuas 1 hauv daim duab hauv qab no:

Yam khoom txawv

Tus lowsrc attribute instructs qhov browser los thauj thawj daim qauv (los yog lwm txoj hauv kev) ntawm thawj daim duab nrog ib tug zoo dua thiab, raws li, ntau dua "teeb". Qhov kev ua kom yuam kev no yog muab rau cov ntaub ntawv qes tshaj plaws rau tus neeg siv. Thawj cov duab, loaded, replaces lub "fake".

Tsis tas li siv galleryimg attribute ntawm img lossis hu tus duab tswj vaj huam sib luag (yog tias koj hover tus cursor dhau nws), uas koj qhib cov txheej txheem Kuv cov duab nplaub tshev thiab sau, txuag los yog xa daim duab los ntawm e-mail. Koj tuaj yeem tua lub vaj huam sib luag los ntawm qhov chaw tus galleryimg los tsis muaj / tsis muaj tseeb, thiab tig rau ntawm qhov muaj / muaj tseeb.

Nyob hauv HTML5 kev qhia tshwj xeeb, qee qhov tsis tau ua dhau los. Yog li, img attributes lowsrc, ciam, longdesc, thiab lub npe raug xa mus rau nyiaj laus.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

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