我需要重写标准的滚动行为。当页面加载时,当鼠标指针位于div之外时,需要滚动“ div.second”。任何帮助表示赞赏!谢谢!
<style>
body {
overflow: hidden;
}
section {
position: flex;
}
div {
position: inline-block;
width: 48%;
height: 200px;
}
.second {
overflow-y: scroll;
}
h1 {
font-size: 36px;
line-height: 100px;
}
</style>
<body>
<h1>Hello</h1>
<section>
<div class="first"><div>
<div class="second">
<h1>Test</h1>
<h1>Test</h1>
<h1>Test</h1>
<h1>Test</h1>
<h1>Test</h1>
<div>
</section>
</body>