0

我在尝试着:

  • 隐藏 Ninja Forms 中的单选按钮
  • 单击后使答案周围的框更改颜色

有人知道吗:

  • 我应该在 Ninja 表单上输入代码的哪个 CSS 框?

  • 我尝试的代码有什么问题?

    我试过了:

  • 将代码输入到与列表项元素样式相关的高级 CSS 中

  • 这段代码:

     $(document).ready(function() {
            $('input[type="radio"]').click(function() {
                $this = $(this);
                $label = $this.parent();
                $label.parent().parent().find('label').css('background', '#f2f2f2');
                $label.css('background', '#000000');
            });
        });
 input[type=checkbox], input[type=radio] {
      visibility: hidden;
      margin: 0;
      width: 0!important;
    }
    input[type=checkbox] + label, input[type=radio] + label { 
      font-size: 16px; 
    }
    input[type=checkbox] + label:hover, input[type=radio] + label:hover { cursor: pointer; }
    input[type=checkbox] + label:before, input[type=radio] + label:before {
      font-family: "ETmodules";
      font-size: 36px;
      position: relative;
      top: 0.3em;
      margin-right: 0.2em;
    }

    
   

4

1 回答 1

0

我希望现在还不算晚,但改变 Stylized Radio Input 的想法是改变 tag 的属性label

label {
  &::before {
    // your code here
  }

  &::after {
    // your code here
  }
}

希望能帮助到你。

于 2018-08-29T12:25:38.673 回答