Putting css borders around radio buttons

前端 未结 7 1955
遥遥无期
遥遥无期 2020-12-01 14:37

I\'m trying to get a garish red border around some radio buttons, but it is not showing up in Firefox latest or Chrome latest. Work fine in IE9/IE8.

Each of the inp

7条回答
  •  盖世英雄少女心
    2020-12-01 14:58

    Complete code using jquery

    https://jsfiddle.net/xcb26Lzx/

    $(function(){
          $('.layer').css('border',0);
        $('input:radio').change(
        function(){
            if ($(this).is(':checked')) {
                $('.layer').css('border','1px solid red');
            }
        });
    });
    

提交回复
热议问题