« Web, HTML, Tech Forum

How do I make a loading screen for my layout?

Posted by Bwa

posted

Forum: Web, HTML, Tech

Ive Seen The Windows XP Layout By Cory And I Was Wondering If Anybody Knows How To Add A Loading Screen But With A Custom Image? (https://layouts.spacehey.com/layout?id=1169)

Thank You.


Report Topic

3 Replies

Sort Replies:

Reply by ★cazimeriz★

posted
updated

<style>

body:before {

content: " ";

height: 100vh;

width: 100vw;

display: block;

position: fixed; 

top: 0; 

left: 0; 

z-index: 100;

background-image: url('');

background-size: cover;

background-repeat: no-repeat;

background-position:center;

animation: yourAnimation 1s ease 1s 1 normal forwards;

pointer-events: none;}

@keyframes yourAnimation { 0.0%{ opacity: 1;} 75%{ opacity: 1; } 100%{ opacity: 0;} } 

</style>


copy and paste that and where it says 

background-image: url('');

you want to put the image url in between the url(''); for example

background-image: url('https://64.media.tumblr.com/59d921976394727b485dc34d31d6abe7/tumblr_mpu5u5X1H21szfc26o2_500.gif');


also you can adjust where it says

animation: yourAnimation 1s ease 1s 1 normal forwards;

to make your laoding screen stay on longer or shorter


Report Reply

Reply by Yadiralake

posted
updated


To add a custom loading screen to your SpaceHey layout, you'll need to modify the HTML and CSS code of your layout. Here's a general outline of how you can achieve this:

  1. Prepare your custom loading screen image: First, you'll need to create or obtain the image you want to use as your loading screen. Make sure the image is optimized for web use and saved in a web-friendly format like JPG or PNG.

  2. Upload the image to your hosting: Upload the custom loading screen image to an image hosting service or your own web hosting server. Take note of the URL of the uploaded image.

  3. Modify the HTML code: Locate the HTML code of your SpaceHey layout. Look for the section that defines the loading screen. It may look something like this:

    htmlCopy code
    <div id="loading-screen">
    <div class="spinner"></div>
    </div>

    Replace this section with an <img> tag that references your custom loading screen image:

    htmlCopy code
    <div id="loading-screen">
    <img src="URL_OF_YOUR_CUSTOM_LOADING_SCREEN_IMAGE" alt="Loading...">
    </div>

    Replace URL_OF_YOUR_CUSTOM_LOADING_SCREEN_IMAGE with the actual URL of your custom loading screen image.

  4. Style the loading screen: If necessary, you can add CSS styles to position and style the custom loading screen. You can do this by modifying the CSS code of your layout. For example:

    cssCopy code
    #loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff; /* optional background color */
    display: flex;
    justify-content: center;
    align-items: center;
    }

    #loading-screen img {
    width: 200px; /* adjust width as needed */
    height: auto;
    }

    Modify the CSS properties according to your layout's design and preferences.

  5. Save and update your layout: Once you've made the necessary changes to the HTML and CSS code, save your layout. If you're using SpaceHey, you can usually update your layout by pasting the modified HTML and CSS code into the appropriate sections of your layout settings.

  6. Test your layout: After updating your layout, test it to ensure that the custom loading screen appears as expected when the page is loading.

By following these steps, you should be able to add a custom loading screen with your own image to your SpaceHey layout. Remember to adjust the code and styles to fit your specific design preferences. Omegle online


Report Reply

Reply by Petronilla Ferri

posted

Hey guys I'm new here and I'd like to share some game-related information. The finest cookie clicker game is now available for females and young people. Usually, people play this game as a way to kill time, but this game is incredible, and I also used to play it. Try out this game and then let me know what you think.



Report Reply