其他分享
首页 > 其他分享> > 黏贴layui单选框复选框代码无效果

黏贴layui单选框复选框代码无效果

作者:互联网

<div class="layui-col-md12">
              <input type="radio" name="sex" value="nan" title="男"><div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><div>男</div></div>
              <input type="radio" name="sex" value="nv" title="女" checked=""><div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i><div>女</div></div>
              <input type="radio" name="sex" value="" title="中性" disabled=""><div class="layui-unselect layui-form-radio layui-radio-disbaled layui-disabled"><i class="layui-anim layui-icon"></i><div>中性</div></div>
            </div>

原因:只黏贴内层标签,缺少layui-form标签了,在layui-col-md12后面加上layui-form标签即可

<div class="layui-col-md12 layui-form">
              <input type="radio" name="sex" value="nan" title="男"><div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><div>男</div></div>
              <input type="radio" name="sex" value="nv" title="女" checked=""><div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i><div>女</div></div>
              <input type="radio" name="sex" value="" title="中性" disabled=""><div class="layui-unselect layui-form-radio layui-radio-disbaled layui-disabled"><i class="layui-anim layui-icon"></i><div>中性</div></div>
            </div>

标签:中性,form,单选框,layui,复选框,标签,黏贴
来源: https://blog.csdn.net/qq_40787608/article/details/123194717