alexer13 Posted October 26, 2012 Report Posted October 26, 2012 Pentru background css - image . Ce dimensiune trebuie sa fie imaginea ca sa se vada full. Sunt ceva dimensiuni de baza ? Quote
CrisTany Posted October 26, 2012 Report Posted October 26, 2012 imaginea poate avea orice dimenisune si 5x5 pixeli daca se poate folosi background-repeat: repeat-x; sau repeat-y; ori no-repeat, asta iti repeta backgroundul ori pe orizontala ori pe verticala depinde ce alegi. Quote
Pacalici Posted October 26, 2012 Report Posted October 26, 2012 Sunt multe detalii pe care nu le-ai precizat. Prima varianta ar fi cum zice CrisTany.A 2-a merge cu css3 si poti da background-size:100% 100%; Vei obtine acelasi lucru pe care il face/facea vechiul windows xp cu stretch la desktop background. Quote
alexer13 Posted October 26, 2012 Author Report Posted October 26, 2012 Atunci sa dau un exemplu concret.Vreau sa pun aceasta imagine ca fundal pe site : http://www.widewallpapers.net/mod/backgrounds/1366x768/background-wide-wallpaper-1366x768-009.jpgmain { are width: 960px;}// + bacground-position:fixed; Quote
JohnDoe Posted October 26, 2012 Report Posted October 26, 2012 background-size:cover;Documentatie: CSS3 background-size property Quote
CrisTany Posted October 26, 2012 Report Posted October 26, 2012 daca vrei sa fie fixed foloseste si background-attachment, iar la marimi nu ai ce sa faci decat sa ii dai repeat sau sa ii modifici dimenisunea in PS, dar oricum la rezolutii diferite tot nu va ramane spatiu pe background, deci foloseste background-repeat Quote
alexer13 Posted October 26, 2012 Author Report Posted October 26, 2012 background-size:cover;Documentatie: CSS3 background-size propertyStiu ca CSS3 nu se impaca foarte bine cu IE.. vor fi probleme pe IE daca folosesc asta ? Quote
Pacalici Posted October 26, 2012 Report Posted October 26, 2012 IE7 si 8 iti spun eu sigur ca nu recunoaste proprietatea. Eu unu iti recomand sa iei imaginea si sa o faci mai mare in Photoshop pana o duci in 2000px latime (eu am testat adineauri si mi se pare ca are inca calitate buna). Apoi o poti pune linistit cu CSS2:background:transparent url(imagine.jpg) no-repeat fixed center top; 1 Quote
alexer13 Posted October 26, 2012 Author Report Posted October 26, 2012 Mersi frumos de raspuns. Quote
JohnDoe Posted October 26, 2012 Report Posted October 26, 2012 (edited) Stiu ca CSS3 nu se impaca foarte bine cu IE.. vor fi probleme pe IE daca folosesc asta ?jquery.backgroundSize.jsMai foloseste si Google inainte sa pui intrebari. Edited October 26, 2012 by JohnDoe Quote
Sim Master Posted October 26, 2012 Report Posted October 26, 2012 O alternativa simpla ar fi sa faci un div care sa fie in spatele tuturor elementelor si sa pui in el imaginea cu width si height 100%, asa poti fi mai sigur ca iti recunoaste si pe IE < 9, doar ca nu e prea practic. Quote
evangilbort Posted April 27, 2013 Report Posted April 27, 2013 (edited) The background property is a shorthand property that allows all the individual background properties to be set in a single declaration. The background CSS property is a shorthand for setting the individual background values in a single place in the style sheet. Edited May 1, 2013 by evangilbort Quote