Indlela yokuchaza nokubeka indawo kwi-WordPress Header Image nge-CSS

NguLisa Sabin-Wilson

Uninzi lweemxholo zeWordPress zinomfanekiso wehloko ovela phezulu ephepheni. Lo mfanekiso uveliswe ngumzobo ochazwe kwixabiso leCSS kwipropathi emele indawo yentloko okanye ngokusetyenziswa kwentloko yesihloko seWordPress.



Uwuchaza njani umfanekiso ongasemva oza kuwusebenzisa njengesihloko

Kwi-WordPress engagqibekanga umxholo wamashumi amabini anesithathu, kubandakanya umfanekiso oyintloko wesiko kwindawo esebenzisa umxholo wamashumi amabini anesithathu ulunge ngokulula. Wonke umsebenzi onzima wenziwe kuwe.



Kwiimxholo ezingenasici somfanekiso wesihloko, ungachaza ngokulula umfanekiso ongasemva womfanekiso wentloko usebenzisa i-CSS. Ngeenjongo zalo mzekelo, uphawu lwe-HTML lwentloko kwitemplate

 

Kwi-CSS (isitayile.css), ungasebenzisa umfanekiso ongasemva ngokuwuchaza kwiipropathi zeCSS ze#intloko. Sebenzisa le khowudi:



#header { background: url(/images/header-image.jpg) no-repeat; width: 980px; height: 100px; }

Ixabiso elingasemva libonisaumfanekiso we-header.jpgumfanekiso. Ukuze lo mfanekiso uvele kwindawo yakho, kuya kufuneka wenze umfanekiso kwaye uwufake kwiserver yakho yewebhu kwi/ imifanekiso /ulawulo.

Xa usebenza nemizobo kwiwebhu, licebo elihle ukusebenzisa iifomati zemifanekiso ye-GIF, JPG, okanye yePNG. Imifanekiso enenani elincinci lemibala (enjengeetshathi, ubugcisa bomgca, iilogo, njalo njalo), ifomathi yeGIF isebenza ngcono. Olunye uhlobo lwemifanekiso (izikrini ezinombhalo kunye nemifanekiso, ukungafihli nto, njalo njalo), sebenzisa iJPG okanye iPNG.

Ungabeka njani, uphinde, okanye uskrole imvelaphi yakho

Emva kokuba ulayishe umzobo oza kuwusebenzisa kumxholo wakho, ungasebenzisa iipropathi zangasemva zeCSS ukuyibeka. Ezona ndawo ziphambili zeCSS -indawo yangasemva,phinda-phinda, kunyeyangasemva-uncamathiselo- kukunceda ufezekise isiphumo esifunekayo.



Ipropathi Inkcazo Imilinganiselo Umzekelo
indawo yangasemva Chaza indawo yokuqala yomfanekiso wakho ongasemva kwi
iphepha lewebhu
emazantsi embindini, ezantsi ekunene, iziko lasekhohlo, iziko lasekunene, iziko
iziko
indawo yangasemva: ezantsi;
phinda-phinda Ichonga ukuba ngaba imvelaphi yakho ingaphinda okanye
ithayile
phinda (uphinda ngokungapheliyo), phinda-y (uphinda ngokuthe nkqo),
Phinda-x (uphinda ngokuthe tye), phinda-phinda (awuphindi)
ukuphinda-phinda: phinda-y;
yangasemva-uncamathiselo Ichonga ukuba ngaba imvelaphi yakho ilungisiwe okanye iskrola
ngefestile yesikhangeli
Iscroll esisigxina isiqhagamshelo esingasemva: skrola;

Yitsho ukuba injongo yakho kuku ithayile, okanye uphinde, umfanekiso ongasemva ngokuthe tye, okanye ngaphaya kwescreen sesikhangeli ukusuka ekhohlo ukuya ekunene ukuze sikalwe ngobubanzi besikhangeli nakweyiphi na ikhompyuter. Ukwafuna ukutshintsha umbala ongasemva ube ngumbala owahlukileyo (njengomhlophe, njengakwisampulu elandelayo). Ukufezekisa oku, vula istayile kwakhona kwaye utshintshe:

background: #f1f1f1;

ukuya

background: #FFFFFF; background-image: url(images/header-image.jpg); background-repeat: repeat-x;

okanye ungasebenzisa

background: #FFFFFF url(images/header-image.jpg) repeat-x;