【发布时间】:2012-02-12 12:39:54
【问题描述】:
有没有办法改变asp.net复选框的样式ui。 我试过这个:
.cabeceraCheckBoxNormal
{
background:url("../../../ig_res/Default/images/ig_checkbox_off.gif") no-repeat;
clear:left;
margin:0;
padding:0;
}
但结果不是我想要的。因为图像出现在控件附近,我可以在图像附近看到正常的样式。 赞这个
编辑: 我决定检查生成的 html,我看到在 asp 复选框上设置的 ID 设置为一个跨度,其中是输入类型复选框... 所以我把样式改成这样:
input[type="checkbox"]
{
background:url("../../../ig_res/Default/images/ig_checkbox_off.gif") no-repeat;
background-position: 3px 2px;
display:block;
clear:left;
margin:0;
padding:0;
}
但什么也没发生
【问题讨论】:
-
复选框取决于浏览器。我尝试了一些像设置边框这样简单的方法,发现它只适用于几个浏览器。您可以在中嵌入复选框并进行装饰。