BONKERS!
为什么Label元素与一切都不一致?
我将所有行高设置为24px,内联块。
html {
font-size: 16px;
font-family:'Lucida Grande', 'Trebuchet MS';
}
.ims-div {
height: 24px;
background: gray;
}
.ims-span {
display: inline-block;
width: 24px; height: 24px;
background: green url('is-check-small-sprite-blue.png') 0 -72px no-repeat;
}
.ims-label {
display: inline-block;
line-height: 24px;
margin: 0; padding: 0; border: 0;
background: purple;
color: white;
font-weight: normal;
}
<div class="ims-div">
<span class="ims-span"></span>
<label class="ims-label">CheckBox 1</label>
</div>
答案 0 :(得分:2)
http://jsfiddle.net/SebastianPataneMasuelli/kMtYN/1/
将vertical-align:middle
添加到标签和范围