您好,我的表单中有一个按钮可以触发日期字段的弹出式日历。我正在尝试使用 png 图像的日历更改按钮的背景图像,但无法使其正常工作
这是代码
<asp:Button ID="btn_date" runat="server" Height="32px" Width="32px"
CssClass="style60" Text="C" />
这是CSS
.style60
{
background-image:url ("Pics/calendar.png");
background-position: top;
}
图像的大小也是 32x32 像素。
最佳答案
按照以下示例尝试使用 ImageButton Controller :
<asp:ImageButton id="btn_date" runat="server"
AlternateText="ImageButton 1"
ImageAlign="left"
ImageUrl="Pics/calendar.png"
OnClick="ImageButton_Click"/>
关于css - 按钮的背景图片不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29343997/