蓝森林首页 | 返回主页 | 本站地图 | 站内搜索 | 联系信箱 |
 您目前的位置:首页 > 自由软件 > 技术交流 > 应用编程


    

蓝森林 http://www.lslnet.com 2006年8月25日 8:28

.net的日历组件中如何控制链接的样式(link\visited\hover)

我用.net的calendar组件做了个日历,但不知道如何来控制它的链接样式。CSS只能用到TD上,不能用到<a>链接上。TD也不能赋ID值。不知道应该怎么解决。以下为代码:
[code]
<script language="vb" runat="server">
        Sub Page_Load(sender As Object,E As EventArgs)
                Calendar1.TodaysDate = "#8/8/2006#"
        End Sub
        Sub DayChange(sender As Object,e As EventArgs)
                Message.Text = "您选择的日期是:" & Calendar1.SelectedDate
        End Sub
</script>
<style type="text/css">
        body,td{
                font-size:12px;
        }
a.titlestyle1:link {
        font-family: "宋体";
        font-size: 14px;
        color: #000099;
        text-decoration: none;
}
a.titlestyle1:visited {
        font-family: "宋体";
        font-size: 14px;
        color: #000099;
        text-decoration: none;
}
a.titlestyle1:hover {
        font-family: "宋体";
        font-size: 14px;
        color: #000099;
        text-decoration:underline;
}
</style>
<Html>
        <Body>
                <Form Runat = "Server">
                        <ASP:Calendar Runat = "Server" Id = "Calendar1" BorderColor = "Black"
                        DayNameFormat = "Short" FirstDayOfWeek="Default" ShowTitle = "True"
                        ShowNextPrevMonth = "True" ShowGridLines = "True" ShowDayHeader = "True"
                        SelectWeekText = "本周" SelectMonthText="本月" SelectedDate = "#8/28/2006#"
                        NextPrevFormat = "ShortMonth" SelectionMode = "DayWeekMonth" TitleFormat = "MonthYear"
                         OnSelectionChanged = "DayChange">
                        <TodayDayStyle BackColor = "#FF4500"/>
                        <SelectorStyle BackColor = "#AFEEEE"/>
                        <NextPrevStyle ForeColor = "Blue" Font-size = "14px" Font-Underline =  "False" CssClass = "titlestyle1"/>
                        <DayHeaderStyle Font-Bold = "True" BackColor = "#FFEEDD"/>
                        <DayStyle ForeColor = "Black"/>
                        <SelectedDayStyle ForeColor = "White" BackColor = "#666666"/>
                        <TitleStyle BackColor = "#CCCCCC"/>
                        <WeekendDayStyle BackColor = "#FFFFCC"/>
                        <OtherMonthDayStyle ForeColor = "Lightgrey"/>
                        </ASP:Calendar>
                        <br>
                        <ASP:Label Runat = "Server" Id = "Message"/>
                </Form>
        </Body>
</Html>
[/code]
请教大家

属性窗口里有
找找。

是指的DW的属性窗口吗?我选中组件之后的属性窗口只有一个样式,如果从那选择是给整个日历加了CSS。不明白说的是哪里

TitleStyle-Font-Underline="false"
版主是指的这个吗?如果是它的话也不行,另外我想在link、visited、hover三种状态时设置显示不同的样式。应该怎么实现呢




Copyright © 1999-2000 LSLNET.COM. All rights reserved. 蓝森林网站 版权所有。 E-mail : webmaster@lslnet.com