Properly stretching images to fit screen size with loadingURL
2 replies, posted
I am a 100% complete PHP noob, so going to need detailed explanation.
I have a 1920x1080 image I'd like to use for my loading screen, currently it spans too far across my screen, or is way too small. Do I need different universal sizes and a script to select the appropriate size or is there a script that will automatically stretch to the appropriate size?
Any useful scripts for switching images also?
Thanks :v:
Using css set the images width to 100% and height to 100%
[code]
<img src="background.png" style="width:100%;height:100%;position:absolute;top: 0;left: 0;" />
[/code]
I assume by 'switching images' you mean a random image is shown each time?
Assuming it's the background image.
[CODE]body {
background: url('background.jpg') center center no-repeat;
background-size: cover;
}[/CODE]
Sorry, you need to Log In to post a reply to this thread.