Kufambisa Saiti Yako neCSS Sprites

spritemaster web

Ini ndinonyora nezve peji kumhanyisa zvishoma pane ino saiti uye chikamu chakakosha chewongororo uye nekuvandudza kwatinoita kunzvimbo dzevatengi vedu. Kunze kwekutamira kumaseva ane simba uye kushandisa zvishandiso senge Zvemukati Dhirivhari Networks, kune mamwe akati wandei ehurongwa hwekushandisa iwo avhareji wewebhu anovandudza anogona kushandisa

Chiyero cheiyo yekutanga Cascading Style Sheet yapfuura makore gumi nemashanu okuberekwa izvozvi. CSS yaive yakakosha shanduko mukuvandudza kwewebhu nekuti yakaparadzanisa zvemukati kubva mukugadzirwa. Tarisa uone ino blog uye chero imwe uye ruzhinji rwekutsikisa musiyano urimo mune rakabatanidzwa masitaera. Mafashoni emafashoni akakoshawo nekuti akachengetwa munharaunda mune cache mukati mebrowser yako. Nekuda kweizvozvo, vanhu vachienderera mberi nekushanyira saiti yako, ivo havasi kurodha pasi pepa rechitara nguva dzese… ingori zvirimo papeji.

Chinhu chimwe cheCSS chinowanzo shandiswa chisiri CSS Sprites. Kana mushandisi akashanyira webhusaiti yako, unogona kusaziva kuti havasi kungoita chikumbiro chimwe cheiyo peji. Ivo ita zvikumbiro zvakawanda… Chikumbiro chepeji, chemashizha echitaera, chero mafaera akabatanidzwa eJavaScript, uyezve mufananidzo wega wega. Kana iwe uine theme ine akateedzana emifananidzo yemiganhu, yekufambisa mabara, kumashure, mabhatani, nezvimwe… bhurawuza rinofanira kukumbira imwe neimwe, imwe panguva kubva kune yako dura rewebhu. Wedzera izvo nezviuru zvevashanyi uye izvo zvinogona kuve makumi ezviuru zvezvikumbiro zvakaitwa kune yako server!

Izvi, zvakare, zvinoderedza nzvimbo yako. A saiti inononoka inogona kukanganisa zvakanyanya kubatanidzwa uye kutendeuka iyo inogadzirwa nevateereri vako. Zano iro vashandisi vewebhu vanoshandisa iri kuisa iyo yese mifananidzo mune imwechete faira… inonzi a sprite. Panzvimbo pekuita chikumbiro kune yega yega yako faira mifananidzo, ikozvino panongoda kuve nechikumbiro chimwe chete kune imwechete sprite mufananidzo!

Unogona kuverenga nezvazvo mashandiro eCSS Sprites kuCSS-Tricks or Inopwanya Magazini yeCSS Sprite post. Pfungwa yangu haisi yekukuratidza kuti ungashandise sei, kungokuraira iwe kuti uve nechokwadi chekuti rako rekuvandudza boka rinovapinza mune ino saiti. Muenzaniso uyo CSS Tricks inopa inoratidza gumi mifananidzo iri gumi zvikumbiro uye inowedzera kusvika 10Kb. Kana yaunganidzwa mune imwechete sprite, ndizvo 1 chikumbiro ndicho 13kb! Chikumbiro chekutenderera uye nguva dzekupindura dzemifananidzo gumi nepfumbamwe dzaenda uye huwandu hwedata hwadzikiswa neanopfuura makumi matatu muzana. Wedzera izvo nenhamba yevashanyi pane yako saiti uye uchanyatsoveura zvimwe zviwanikwa!

globalnavThe apuro yekufambisa bar muenzaniso wakanaka. Bhatani rega rega rine mashoma anoti… kunyangwe iwe uri papeji, kunze kwepeji, kana kusimudzira pamusoro pebhatani. CSS inotsanangura zvinongedzo zvebhatani uye inopa dunhu renyika chaiyo kune vashandisi browser. Ese aya matunhu akadonha pamwechete mune imwechete graphic - asi inoratidzwa dunhu nedunhu sezvakatsanangurwa mune dhizaini jira.

Kana vagadziri vako vachida maturusi, pane toni kunze uko inogona kuvabatsira, kusanganisira iyo Compass CSS chimiro, Request Reduce yeASP.NET, CSS-Mushanduri zvaRuby, CSSSprite script ye Photoshop, SpritePad, SpriteRight, SpriteCow, ZeroSprites, Project Fondue's CSS Sprite jenareta, Sprite Tenzi Webhu, Uye SpriteMe Bookmarklet.

Screenshot of Sprite Tenzi Webhu:
spritemaster web

Martech Zone haishandise mifananidzo yekumashure mune dingindira rayo, saka hatifanirwe kuendesa nzira iyi panguva ino.

2 Comments

  1. 1

    Mirira ... ko muunganidzwa wose hausi "mufananidzo" (kana "ndege"), uye mufananidzo mudiki wega wega (kana boka diki remifananidzo kana iri yeanimated kana kuchinjanisa) "sprite"?

    Zvimwe zvinhu zvakapihwa zita kubvira pandakapedzisira kubata chinhu chakadai asi ndaigona kupika Sprite ndicho chinhu chakazopedzisira charatidzwa, kwete tafura huru yedata yayakadhonzwa kubva.

    (“Sprite table”… handizvo here?)

    • 2

      Tinogona kunge tichitaura zvinhu zviviri zvakasiyana, Mark. NeCSS, unogona kunyatso tsanangura kuti ndeipi 'chikamu' chefaira remufananidzo kuratidza uchishandisa zvinorongeka. Izvi zvinokutendera kuti uise mifananidzo yako yese mu'sprite' imwechete wobva wanongedza nzvimbo yaunoda kuratidza neCSS.

Unofungei?

Nzvimbo iyi inoshandisa Akismet kuderedza spam. Dzidza kuti sei deta yako inoshandiswa.