试卷列表、点击题目运动下滑
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style media="screen">
* {
margin: 0;
padding: 0px;
}
.top {
width: 100%;
height: 80px;
background-color: red;
}
.left-content li.item {
margin-bottom: 20px;
padding: 10px 50px;
background-color: pink;
}
.left-content li.item ol li {
margin-left: 60px;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="top"></div>
<div class="left-content">
<ul>
<li class="item">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis
</p>
<ol>
<li>A.consectetur adipisicing elit,</li>
<li>B.consectetur adipisicing elit,</li>
<li>C.consectetur adipisicing elit,</li>
<li>D.consectetur adipisicing elit,</li>
</ol>
</li>
<li class="item">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis
aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<ol>
<li>A.consectetur adipisicing elit,</li>
<li>B.consectetur adipisicing elit,</li>
<li>C.consectetur adipisicing elit,</li>
<li>D.consectetur adipisicing elit,</li>
</ol>
</li>
<li class="item">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis
</p>
<ol>
<li>A.consectetur adipisicing elit,</li>
<li>B.consectetur adipisicing elit,</li>
<li>C.consectetur adipisicing elit,</li>
<li>D.consectetur adipisicing elit,</li>
</ol>
</li>
<li class="item">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis
aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<ol>
<li>A.consectetur adipisicing elit,</li>
<li>B.consectetur adipisicing elit,</li>
<li>C.consectetur adipisicing elit,</li>
<li>D.consectetur adipisicing elit,</li>
</ol>
</li>
<li class="item">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis
</p>
<ol>
<li>A.consectetur adipisicing elit,</li>
<li>B.consectetur adipisicing elit,</li>
<li>C.consectetur adipisicing elit,</li>
<li>D.consectetur adipisicing elit,</li>
</ol>
</li>
<li class="item">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis
aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<ol>
<li>A.consectetur adipisicing elit,</li>
<li>B.consectetur adipisicing elit,</li>
<li>C.consectetur adipisicing elit,</li>
<li>D.consectetur adipisicing elit,</li>
</ol>
</li>
</ul>
</div>
</body>
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script type="text/javascript">
var $Item = $('.left-content li.item');
$Item.on('click', function() {
var _top = $(this).offset().top + $(this).height() + 40;
setTimeout(function() {
$("html,body").animate({
scrollTop: _top
}, 1000);
}, 2000)
})
</script>
</html>