我在以下代码中缺少什么?为什么完美滚动条可怕地崩溃?
似乎它用浏览器主滚动条弄乱了 myDiv 滚动条......任何帮助表示赞赏。
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<meta charset="utf-8" />
<link href="perfect-scrollbar.min.css" type="text/css" rel="stylesheet">
<style>
#myDiv {
width: 400px;
height: 400px;
overflow: auto;
background-color: #eeeeee;
margin: auto;
}
</style>
</head>
<body>
<div id="myDiv">
<p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p><p>Test perfect scrollbar</p>
</div>
<script type="text/javascript" src="jquery-3.1.0.min.js"></script>
<script type="text/javascript" src="perfect-scrollbar.jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#myDiv').perfectScrollbar();
});
</script>
</body>
</html>
谢谢