ASP.Net日历控制样式背后的标题

时间:2016-01-29 14:11:07

标签: asp.net web-controls backcolor asp.net-webcontrol calendar-control

我正在尝试删除日历标题背后的灰色背景,但没有任何运气。这是工具箱中的默认日历控件。谁能看到我错过的东西?

我最好的猜测是:

#Calendar1 td
{
    background-color: transparent;
}

但没有奏效。我似乎无法掌握这种背景颜色。

enter image description here

2 个答案:

答案 0 :(得分:1)

您需要使用{/ 1}}属性,例如

TitleStyle-BackColor="Transparent"

答案 1 :(得分:1)

来源:Calendar Class

尝试将BorderWidth属性设置为0,将BackColor属性设置为透明。

ASP.NET示例

      <asp:Calendar id="calendar1" runat="server">
           <BorderWidth = "0">
           </BorderWidth>

           <TitleStyle BackColor = "Transparent">
           </TitleStyle>
      </asp:Calendar>