原生JS版本
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>文字上下无缝轮播</title>
</head>
<style>
* {
margin: 0;
padding: 0;
}
#container{
width: 60%;
margin: 100px auto;
position: relative;
height: 200px;
overflow: hidden;
}
#list-wrapper{
position: relative;
}
ul {
list-style: none;
background: #f8f8f8;
text-align: center;
padding: 0 20px;
}
li{
height: 35px;
line-height: 35px;
color: #fff;
}
li:nth-child(odd){