Aller au contenu

Photo

Background image repeat


12 réponses à ce sujet

#1
vania z

vania z
  • Members
  • 471 messages

May I suggest that you change your background class fullSize from

fullSize {
background-size: 102% auto;
}

to 

fullSize{

background-position: right center;

}

? Because currently on fullHD displays it gets repeated vertically.

5lc5.jpg

pgnj.jpg



#2
vania z

vania z
  • Members
  • 471 messages

Also, to make it perfect you will need a javasript to scale the image based on screen resolution. Because image dimension is something like 2000x1000, it won't look good on 1440p displays even with my fix. I could write the javascript for you, if you like. 



#3
vania z

vania z
  • Members
  • 471 messages

window.onresize = function(event)
{
var fullSize = document.getElementById('ipboard_body');
fullSize.style.backgroundSize = 'auto '+ window.innerHeight+'px';
fullSize.style.backgroundPosition = 'right center';
}

you should execute this function on loading of the page and on resize events, than background will look properly.



#4
vania z

vania z
  • Members
  • 471 messages

I see that you fixed it in your own way. But you have done it without image scaling with javascript, it still looks bad on screens with high enough resolution. At least it looks good(rather good, except for large whitespace below the image) on 1080p screens. 



#5
vania z

vania z
  • Members
  • 471 messages

ad7o.jpgThats how it currently looks on very high resolution screens. You can either fix this by making image fade to white graciously or by scaling the image using javascript.



#6
vania z

vania z
  • Members
  • 471 messages

For you to compare, thats how it looks on 16:9 screen with my script. 

lqv5.jpg



#7
vania z

vania z
  • Members
  • 471 messages

To make my script even better, I changed it a bit. The version you may want to use is this:

 

window.onresize = function(event)
{
var fullSize = document.getElementById('ipboard_body');
if (window.innerHeight/window.innerWidth < 990/2560)
{
fullSize.style.backgroundSize = window.innerWidth+'px auto';
}
else
{
fullSize.style.backgroundSize = 'auto '+ window.innerHeight+'px';
}
fullSize.style.backgroundPosition = 'right top';
}

window.onload = function(event)
{
var fullSize = document.getElementById('ipboard_body');
if (window.innerHeight/window.innerWidth < 990/2560)
{
fullSize.style.backgroundSize = window.innerWidth+'px auto';
}
else
{
fullSize.style.backgroundSize = 'auto '+ window.innerHeight+'px';
}
fullSize.style.backgroundPosition = 'right top';
}
What I added is check for screen aspect ratio, to see if it is greater than the aspect ratio of your background image. I heard recently about displays with AR something like 26:9, it wouldn't look good on this screens. Now I fixed that.



#8
vania z

vania z
  • Members
  • 471 messages

Also, for image not to jump after the page is loaded, it is better to compute css server-side. The same thing my javascript does, but do it on the server. I don't know what language do you use and which framework, if I knew I could write this for you too. 



#9
vania z

vania z
  • Members
  • 471 messages

I checked your previous site, social.bioware.com there you had it fade graciously to black. 



#10
Justin Edmond

Justin Edmond
  • BioWare Employees
  • 203 messages

Jesse (Programming Lead for social & forums) is out right now; but I'll make sure this gets to him.


  • Animositisomina et luna1124 aiment ceci

#11
vania z

vania z
  • Members
  • 471 messages

Thanks a lot :)



#12
Jesse Reid

Jesse Reid
  • BioWare Employees
  • 998 messages
And I will forward this along to Jessica. :) Thanks vania z.
  • Sareth97 et luna1124 aiment ceci

#13
Jessica Merizan

Jessica Merizan
  • BioWare Employees
  • 423 messages

We are looking into this :) 


  • luna1124 aime ceci