How can I prevent the browser from scrolling on top of the page when clicking the checkbox?

前端 未结 3 1700
Happy的楠姐
Happy的楠姐 2020-12-16 17:46

Whenever I click on the checkbox, the browser window (firefox) will scroll on the top of the screen.
How can I prevent this behavior so when I click on the checkbox the

3条回答
  •  南笙
    南笙 (楼主)
    2020-12-16 18:19

    you could hide your checkbox input like this:

    #ck-button label input {
        position:absolute;
        top:+20px;
        visibility: hidden;
    }
    

提交回复
热议问题