html checkbox和label 文字不对齐解决办法
做用html或bootstrap时,表单元素和文字不对齐现实,不管用什么vertical-align:middle
,也无法解决。
先看现象:
<input type="radio" id="agreed" name="Appeal" value="Agreed" class="form-control radioAppeal"> <label for="agreed" style="margin-right: 20px;">同意</label>
<input type="radio" id="rejected" name="Appeal" value="Rejected" class="form-control radioAppeal"> <label for="rejected">不同意</label>
解决办法:
.flex{display:flex; align-items:center;}
<div class="flex">
<input type="radio" id="agreed" name="Appeal" value="Agreed" class="form-control radioAppeal"> <label for="agreed" style="margin-right: 20px;">同意</label>
<input type="radio" id="rejected" name="Appeal" value="Rejected" class="form-control radioAppeal"> <label for="rejected">不同意</label>
</div>
原文地址:https://blog.csdn.net/tianlu930/article/details/143506288
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!