Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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

    #1340425

    Hey 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,
    Mike

    #1340428
    This reply has been marked as private.
    #1340476
    This reply has been marked as private.
    #1340496

    Hi,
    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,
    Mike

    #1340996

    Hi 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, 10 months ago by Jak73.
    #1341152

    Hi,
    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,
    Mike

    #1341506

    Hi 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

    #1341515

    Hi,
    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
    2022-02-20_001.jpg
    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

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.