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:
So how would I use JavaScript to make this slideshow and how would i add some effects?
CodingForums...
ما را در سایت CodingForums دنبال می کنید
برچسب : نویسنده : codingforums بازدید : 204 تاريخ : سه شنبه 6 شهريور 1397 ساعت: 7:47