xinheng

<span class="choose"><input type="checkbox" class="input_check" id="check3"><label for="check3"></label></span>

  

.choose {
                position: relative;
            }
            .input_check {
                position: absolute;
                visibility: hidden;
            }
            .input_check+label {
                display: inline-block;
                width: 16px;
                height: 16px;
                border: 1px solid #c00;
                cursor: pointer;
            }
            .input_check:checked+label:after {
                content: "";
                position: absolute;
                left: 2px;
                bottom: 12px;
                width: 9px;
                height: 4px;
                border: 2px solid #e92333;
                border-top-color: transparent;
                border-right-color: transparent;
                -ms-transform: rotate(-60deg);
                -moz-transform: rotate(-60deg);
                -webkit-transform: rotate(-60deg);
                transform: rotate(-45deg);
            }

  js:获取到input的checked的状态

$(\'.input_check\').click(function(){
	console.log($(this).prop(\'checked\'))
})

  

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-12-16
  • 2022-02-09
  • 2021-12-13
  • 2021-11-28
猜你喜欢
  • 2022-01-07
  • 2022-02-02
  • 2022-02-22
  • 2022-02-04
  • 2021-07-26
  • 2021-07-09
  • 2022-01-25
相关资源
相似解决方案