I'm playing around with a fixed background image for a container to make a cool effect, but I'm in doubt what size the background image should be to not repeat itself. The image is centered and scaled to occupy the container. In this example my container is 310px in the height and the width equals the width of the visitors computer screen. Is there some guidelines about how the image should be sized to not make it stretch ugly or repeat itself when scrolling down the page?
Asked
Active
Viewed 144 times
0
-
With monitors being available with a ~4000 pixel width, and the possibility of spanning a browser horizontally across six such monitors, you may want to temper your desire to have just one image at that sort of size. – Andrew Morton Sep 06 '14 at 22:08
-
If you wanted something abstract and non-repeating, you could look at a Perlin noise generator. – Andrew Morton Sep 06 '14 at 22:16
1 Answers
0
If picture's width equals the width of the visitors computer screen than picture always will be stretched if exceeds its natural size. You should more focus to find correct layout. I would prevent that with panel where picture is placed than you would achieve needed effect ie.
yourPanel_Frame.setResizable(false);
Anyway it is all about LayoutManager. I would experiment with few and find out which one suits my purposes

Andrew_Dublin
- 745
- 6
- 22