您的位置:首页 > 其它

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

2018-01-08 12:25 351 查看


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

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


  


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

<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>


  
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: