<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
#divs{width: 200px;height: 100px;position: absolute;overflow: hidden;
margin: 30px auto;}
img{width: 100%;display: none;}
</style>
<script src="js/jquery-3.1.0.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(function(){
var c= 1;
var $imgs = $('img');
$($imgs).eq(0).fadeIn(3000);
setInterval(function(){
$($imgs).eq(c).fadeIn(3000);
$($imgs).eq(c-1).fadeOut(3000);
c++;
if(c>4){
c=0;
$($imgs).eq(4).fadeOut(3000);
}
},3000)
});
</script>
</head>
<body>
<div id="divs">
<img src="img/1.jpg"/>
<img src="img/2.jpg"/>
<img src="img/3.jpg"/>
<img src="img/4.jpg"/>
<img src="img/5.jpg"/>
</div>
</body>
</html>