-
AuthorPosts
-
February 13, 2022 at 1:06 am #1340328
Hi,
when i load my website, there is a black loading screen with a loader symbol.
How can ich change the color of the background while loading?
Is it possible to use a background image while loading?kind regards Jak
February 14, 2022 at 12:46 am #1340425Hey Jak73,
To use a background image with the siteloader try this css:#top .av-siteloader-wrap { background-repeat: no-repeat; background-image: url(https://joakims.art/wp-content/uploads/2022/02/bg-intro-2000px.jpg); background-position: 50% 100%; background-attachment: scroll; background-size: cover; }
After applying the css, please clear your browser cache and check.
Best regards,
MikeFebruary 14, 2022 at 2:04 am #1340428This reply has been marked as private.February 14, 2022 at 12:54 pm #1340476This reply has been marked as private.February 14, 2022 at 2:17 pm #1340496Hi,
You can add two rules, so remove the one above and add this instead:@media only screen and (max-width: 767px) { #top .av-siteloader-wrap { background-repeat: no-repeat; background-image: url(https://joakims.art/wp-content/uploads/2022/02/bg-intro-2000px.jpg); background-position: 50% 100%; background-attachment: scroll; background-size: cover; } } @media only screen and (min-width: 768px) { #top .av-siteloader-wrap { background-repeat: no-repeat; background-image: url(https://joakims.art/wp-content/uploads/2022/02/bg-intro-2000px.jpg); background-position: 50% 100%; background-attachment: scroll; background-size: cover; } }
then change the first image for mobile and the second for desktop, which means to use different images.
After applying the css, please clear your browser cache and check.Best regards,
MikeFebruary 16, 2022 at 11:27 pm #1340996Hi Mike,
thanks for your reply!
This is great! Can i do this for vertical mobile view too? This would be perfect…
What is the recommended size for the different images?
Kind regards Jak
- This reply was modified 2 years, 9 months ago by Jak73.
February 17, 2022 at 1:43 pm #1341152Hi,
Portrait and landscape mobile widths for a background image would be very different, so you will deed to use different images, to know the widths for your images test your device with this tool: screen resolution, you may need to reload for portrait and landscape.
Then model this css:@media only screen and (max-width: 767px) and (orientation: portrait) { #top .av-siteloader-wrap { background-repeat: no-repeat; background-image: url(https://joakims.art/wp-content/uploads/2022/02/bg-intro-2000px.jpg); background-position: 50% 100%; background-attachment: scroll; background-size: cover; } } @media only screen and (max-width: 767px) and (orientation: landscape) { #top .av-siteloader-wrap { background-repeat: no-repeat; background-image: url(https://joakims.art/wp-content/uploads/2022/02/bg-intro-2000px.jpg); background-position: 50% 100%; background-attachment: scroll; background-size: cover; } } @media only screen and (min-width: 768px) { #top .av-siteloader-wrap { background-repeat: no-repeat; background-image: url(https://joakims.art/wp-content/uploads/2022/02/bg-intro-2000px.jpg); background-position: 50% 100%; background-attachment: scroll; background-size: cover; } }
Note the first rule:
(max-width: 767px) and (orientation: portrait)
is for portrait mobile.
The second rule:(max-width: 767px) and (orientation: landscape)
is for landscape mobile.
The last rule is the same as the last rule before and is for portrait and landscape tablet / desktop.Best regards,
MikeFebruary 20, 2022 at 4:28 pm #1341506Hi Mike,
thank you very much! I’m using your code now and it works very nicely.
Is there a way to make my site faster? It seems everything is loaded now at the same time and my website went a bit slower. Is this possible?kind regards Jo
February 20, 2022 at 5:58 pm #1341515Hi,
Glad this helped, below you will find a link to a WebPageTest and your images could be smaller, try TinyJPG
I tested one of your images from the WebPageTest and TinyJPG made it 73% smaller
It looks like you only have about 12 images on your homepage so you could manually do this with FTP, download ▸ TinyJPG ▸ re-upload or you can use the TinyJPG plugin, it’s up to you, I believe you have to signup to use the plugin.
You would find a caching plugin like WP Fastest Cache will also help, other than that your site seems to load well.Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.