我正在使用jquery,因此div位于absolute位于鼠标光标之后,并显示为围绕它的圆圈。
问题:当光标在div上时,我无法滚动正文。
非常感谢任何解决方法或帮助!
HTML
<div class="follower"></div>
<main class="main">
<div class="container">
</div>
<div class="container">
</div>
</main>
CSS
.follower {
width: 35px;
height: 35px;
border: white 3px solid;
border-radius: 40px;
transition-duration: 250ms;
transition-timing-function: ease-out;
position: absolute;
transform: translateX(-50%) translateY(-50%);
z-index: 25;
overflow: hidden;
}
JS
$(document).on('mousemove', (event) => {
$('.follower').css({
left: event.clientX,
top: event.clientY,
});
});
FIDDLE
https://jsfiddle.net/xe1h7cda/12/?utm_source=website&utm_medium=embed&utm_campaign=xe1h7cda
答案 0 :(得分:1)
添加到您的关注者css:
指针事件:无;