我创建了一个带有名称的复选框。我得到的复选框名称低于该复选框。 所以我需要使它们平行(直线)。
checkbox c=new checkbox("name");
c.setStyleName("checkbox_style");
Below one is checkbox css code
.checkbox_styleinput {
font-family: "Segoe UI Semibold", "Segoe UI Semibold IE";
font-size: 12px;
margin-bottom: 5px;
}
By using above code the entire checkbox and its name is shifting up But I need to shift name of checkbox to upper to make checkbox and name of checkbox parallel.
请帮我完成这个
最佳答案
已知行为。您也可以在展示柜中看到它。
通过在样式表中添加以下内容来修复。它将应用于所有 checkbox
输入类型。
input[type="checkbox"] {
vertical-align: middle;
}
您也可以对 radio
输入应用相同的方法。
关于javascript - 我只需要将复选框的名称转移到某些像素顶部而不是复选框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21906637/