项目中用到复选框的地方很多,题目选项、同意协议等等,但复选框和后面的文字在垂直方向却总有点不对齐,如下图:
解决办法很多,这里就说一种简单易用的,代码如下:
input{ margin-top: -2px; margin-bottom: 1px; vertical-align: middle; }
这样看着就舒服多了。