Html 垂直对齐复选框标签?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15230820/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 06:09:50 来源:igfitidea点击:
Vertical align checkbox label?
提问by user2043533
I have checkboxes like this:
我有这样的复选框:
<label class="checkbox-label"><input type="checkbox" value="115">Administrators</label>
But I cannot fugure out how to style the label to be center valigned to the checkbox.
但我无法弄清楚如何将标签的样式设置为与复选框居中对齐。
I tried adding vertical-align:middle;
我尝试添加 vertical-align:middle;
Thanks
谢谢
回答by Artur K?pp
回答by James Coyle
回答by Honorable Chow
Adjust the line height of the label.
调整标签的行高。