87,988
社区成员




<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title> 页面名称 </title>
<style type="text/css">
.p {
width: 30px;
height: 40px;
overflow: hidden;
display: inline-block;
}
.p div {
width: 30px;
height: 40px;
background-color: #000;
color: #fff;
font-size: 30px;
line-height: 40px;
text-align: center;
border-radius: 4px;
margin-bottom: 2px;
margin-top: 0px;
}
.p.tra div:first-child {
transition: margin-top 300ms;
margin-top: -42px;
}
</style>
</head>
<body>
<div id="s" class="p tra">
<div></div>
<div>0</div>
</div>
<script type="text/javascript">
setInterval(function(){
var os = document.getElementById("s");
var osd = os.getElementsByTagName("div");
osd[0].innerText = osd[1].innerText;
osd[1].innerText = (parseInt(osd[1].innerText, 10)+1)%10;
os.className = "p";
setTimeout(function(){
os.className = "p tra";
}, 0);
}, 1000);
</script>
</body>
</html>