How can I make my modified radio buttons tabbable?

前端 未结 1 800
独厮守ぢ
独厮守ぢ 2021-01-12 11:44

I\'ve used some CSS to make mobile-friendly \'radio\' buttons by hiding the inputs and using the label elements instead. The code is below, but I\'

1条回答
  •  隐瞒了意图╮
    2021-01-12 12:38

    If you hide the inputs by setting their opacity to 0 they will still be tabbable:

    .radio-select input[type='radio']{
        opacity:0;
        filter:alpha(opacity=0);
        position:absolute
    }
    

    jsfiddle

    0 讨论(0)
提交回复
热议问题