<title> Native JS Carousel </title>
<meta charset= "Utf-8"/>
<style>
*{margin:0;padding:0}
ul{border:1px solid #eee; width:100%;height:300px;position:relative}
li{width:100%;height:300px;position:absolute;text-align:center;font-size:100px;line-height:300px;top:0px;}
Ul>li:nth-child (1) {background:red}
Ul>li:nth-child (2) {Background:blue}
Ul>li:nth-child (3) {Background:chartreuse}
Ul>li:nth-child (4) {Background:darkseagreen}
</style>
<body>
<div>
<ul id= "der" >
<li> First chapter </li>
<li> Chapter II </li>
<li> Chapter III </li>
<li> Fourth Chapter </li>
</ul>
</div>
<script>
Dimo ("Der")
function Dimo (x) {
Par=document.getelementbyid (x);
Childs=par.childnodes
for (i=0;i<childs.length;i++)
{
if (childs[i].nodetype!==1)
{
Par.removechild (Childs[i])
}
More information daily share add Group 120342833 verify answer ZZ
}
Show=0
SetInterval (function () {
show++
if (show>childs.length-1)
{
Show=0
}
for (i=0;i<childs.length;i++)
{
childs[i].style.opacity= "0"
childs[i].style.zindex= "-2"
childs[i].style.transition= "All 0.35s"
}
childs[show].style.opacity= "1"
childs[show].style.zindex= "1"
},2000)
}
</script>
</body>
JS+C3 color-changing wheel seeding diagram