我更改了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