input[type="checkbox"]与label对齐

 

  项目中遇到文字与 checkbook 无法水平对齐, 源码如下:

<div align='center'>
    <input type="checkbox" id="cbContinue" />
    <label for="cbContinue" style="color:red; cursor:pointer;">添加成功后,窗体不关闭,继续添加下一条信息</label>
</div>

  input[type="checkbox"]与label对齐

  查阅网上解决方法自己总结后,修改如下:

<div align='center'>
    <input type="checkbox" id="cbContinue" style=" display: inline-block; vertical-align: middle; margin-bottom: 3px;" />
    <label for="cbContinue" style=" color:red; cursor:pointer; margin:3px 0; vertical-align: middle;">添加成功后,窗体不关闭,继续添加下一条信息</label>
</div>

  input[type="checkbox"]与label对齐

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
  • 2021-05-30
  • 2021-05-26
  • 2022-12-23
  • 2021-11-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案