我更改了gwt中的複選框樣式,但文本沒有出現在中間(垂直)。它出現在頂部。gwt複選框文本對齊
我試圖添加填充,但這並沒有幫助。向左側添加填充效果不錯,但填充到頂部不起作用。
label {
display: inline-block;
cursor: pointer;
position: relative;
padding-left: 25px;
padding-top: 5px;
margin-right: 5px;
font-size: 12px;
}
input[type=checkbox] {
display: none;
padding-top: 5px;
}
label:before {
background-image: url(images/csscheckbox.png);
content: "";
display: inline-block;
width: 22px;
height: 22px;
margin-right: 10px;
position: absolute;
left: 0;
/*border-radius:5px 5px 0px 0px;*/
}
.gwt-CheckBox {
padding-top: 5px;
}
.gwt-CheckBox label:before {
padding-top: 5px;
}
input[type=checkbox]:checked+label:before {
background-position: 0 -22px;
background-image color: aqua;
font-size: 12px;
text-align: center;
line-height: 13px;
}
.agreement {
margin-left: 5px;
}
可能是什麼問題?
不,它不工作。 – Bennet
什麼不工作?你已經評論你的問題...我不確定你在說什麼! – Onkar