How do I make a background slideshow using Javascript

ساخت وبلاگ
I have three images and I want to set them as my background, but I want them to change every 10 seconds, from one image background to the next. How do I do that with Javascript. Here are my HTML and CSS

test.html
Code:

<html>
    <head>
              <title> Slideshow demo </title>
                  <meta charset = "utf-8"/>
                 
                  <link rel = "stylesheet" href = "test.css">
        </head>
       
        <body id = "body">
              <p>
                    Hello world!! This is just a test
                  </p>
                 
                  <script src = "test.js"> </script>
        </body>
</html>

test.css
Code:

body p
{
        background-color: lightgrey;
        color: blue;
        text-align: center;
        padding: 50px 0px 50px 0px;
}

The three images I want to put as my background:
Click image for larger version. 
Name:	rainBackground.jpg 
Views:	5 
Size:	19.9 KB 
ID:	17978
Click image for larger version. 
Name:	leafBackground.jpg 
Views:	4 
Size:	6.3 KB 
ID:	17977
Click image for larger version. 
Name:	starBackground.jpg 
Views:	4 
Size:	9.6 KB 
ID:	17979

So how would I use JavaScript to make this slideshow and how would i add some effects?
Attached Thumbnails
Click image for larger version. 
Name:	leafBackground.jpg 
Views:	N/A 
Size:	6.3 KB 
ID:	17977 Click image for larger version. 
Name:	rainBackground.jpg 
Views:	N/A 
Size:	19.9 KB 
ID:	17978 Click image for larger version. 
Name:	starBackground.jpg 
Views:	N/A 
Size:	9.6 KB 
ID:	17979 
CodingForums...
ما را در سایت CodingForums دنبال می کنید

برچسب : نویسنده : codingforums بازدید : 204 تاريخ : سه شنبه 6 شهريور 1397 ساعت: 7:47