Radio button causes browser to jump to the top

后端 未结 5 596
甜味超标
甜味超标 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:17

    I have the same problem, I use @Frank Conijn's solution,but if the radio set visibility: hidden; or display:none,the label(for="#id") not work in IE8, at last, I fix it like this:

    .rdbut label input {
      position:absolute;
     left: -9999px;
     }
    

    do not set top value

提交回复
热议问题