So, currently I have some background images that are just .jpgs. I have this in my css stylesheet:
body.one:before {
content: "";
display: block;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: -10;
background: [img[images/gui/one.jpg]] no-repeat center center;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
It seems to work pretty well, and I have this format so that it scales with cell phones. The only tiny little thing it does wrong is adjust the screen a bit when a scrollbar shifts the image over. But that's beside the point.
I see this website: https://www.base64-image.de/
I can use it to get the image converted into some kind of encoding.
But, there's two options.
A version for: For use as CSS background, which looks like this at the start:
url('data:image/jpeg;base64,/
And a version for: For use in <img> elements, which looks like this at the start:
data:image/jpeg;base64,/
I don't know which to use, really. Since I am using it as a background image. Any ideas?
Also, as for this css stuff. I chose it mostly because it seems to scale down with screen size and maybe retain image aspect. That that, on small screens, it looks mostly fine too. I found the code for this ages ago. But, is this a good way to do that behavior? I haven't looked into this much, since I'm happy with my play from before. But, I'm just curious.