1
Bonkers!標籤CSS讓我瘋狂
爲什麼Label元素不符合一切?
我將所有行高設置爲24px,行內塊。
例如這裏:http://jsfiddle.net/kMtYN/
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>
噢,我的..它似乎在所有瀏覽器的工作?爲什麼標籤會這樣做?我嘗試重置任何我能想到的默認值。謝謝!! – FFish 2010-11-24 18:11:16