Radio button causes browser to jump to the top

后端 未结 5 555
甜味超标
甜味超标 2021-02-05 14:48

Problem:

When clicking on a label (for a radio button that has been intentionally hidden by positioning it off-screen), the browser undesirably jumps to the top of the

5条回答
  •  失恋的感觉
    2021-02-05 15:07

    Just add opacity: 0; to your input[type="radio"] like this

    input[type="radio"] {
      opacity: 0;
      position: absolute;
    }
    

提交回复
热议问题