请教,超级链接不显示下划线,鼠标移动上去会变色,要怎么处理?谢谢 
包括
在HTML中的<a href

HyperLink控件两方面,该怎么处理这个问题呢?
谢谢! 

解决方案 »

  1.   

    <style type="text/css">
    <!--
    .aa:link {
    FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: "宋体"; letter-spacing:0px; TEXT-DECORATION: none
    }
    .aa:visited {
    FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: "宋体"; letter-spacing:0px; TEXT-DECORATION: none
    }
    .aa:hover {
    FONT-SIZE: 12px; COLOR: #cc0000; FONT-FAMILY: "宋体"; letter-spacing:0px; TEXT-DECORATION: underline
    }
    .aa:active {
    FONT-SIZE: 12px; COLOR: #ff0000; FONT-FAMILY: "宋体"; letter-spacing:0px; TEXT-DECORATION: underline
    }
    -->
    </style>
    <a href="" class="aa">sdfsdfsdfds</a>
      

  2.   

    将以下代码放入你的css中,对HTML中的<a href和HyperLink控件都好使的。
    A
    {
        text-decoration: none;
    }A:active
    {
        text-decoration: none;
    }
    A:hover
    {
        text-decoration: none;
    }
    A:link
    {
        text-decoration: none;
    }
    A:visited
    {
        text-decoration: none;
    }
      

  3.   

    <style type="text/css">
    A:visited
    {
        COLOR: gray;text-decoration: none
    }
    A:active
    {
        COLOR: Green
    }
    A:link
    {
        COLOR: black;text-decoration: none
    }
    A:HOver
    {
        COLOR: Red
    }
    </style>
    在网页中加上上面的css,text-decoration: none表示不显示下划线
      

  4.   

    <asp:HyperLink  cssClass="aa" ....
      

  5.   

    1、style="text-decoration:none" 可以实现没有下划线;
    2、具体描述如下,你可以任何设置颜色。A:active :active 设置当链接处于激活状态时 A 元素的样式。 
    A:hover :hover 设置当用户将鼠标指针悬停在链接上时 A 元素的样式。 
    A:link :link 设置当链接最近没有访问过时 A 元素的样式。 
    A:visited :visited 设置当链接最近访问过时 A 元素的样式。 A
    {
        text-decoration: none;
    }A:active
    {
        text-decoration: none;
    }
    A:hover
    {
        color: red;
        text-decoration: none;
    }
    A:link
    {
        text-decoration: none;
    }
    A:visited
    {
        text-decoration: none;
    }
      

  6.   

    在vs.net 2002 中我是不是把这段css:
    A
    {
        text-decoration: none;
    }A:active
    {
        text-decoration: none;
    }
    A:hover
    {
        color: red;
        text-decoration: none;
    }
    A:link
    {
        text-decoration: none;
    }
    A:visited
    {
        text-decoration: none;
    }拷到到Styles.css文件中,然后把HyperLink控件的cssClass属性设置为A就可以拉?!
    可是我这么做后却没有起作用!
    这是怎么回事呢?谢谢前辈们!
      

  7.   

    如果你用了a这种方式
    不需要指定cssClass
    什么也不用做
    这个就跟给<a></a>这个HTML标记加了些属性一样
      

  8.   

    现在是,我用A这种方式,还是另外起名,比如用aa,然后把HyperLink控件的cssClass属性设置为aa,
    这HTML中加上css的引用
    <LINK REL="stylesheet" Type="text/css" HREF="Styles.css">
    还是不起作用。
    这到底是那里出错了 呢?
    谢谢前辈!
      

  9.   

    现在是,我用A这种方式,还是另外起名,比如用aa,然后把HyperLink控件的cssClass属性设置为aa,
    这HTML中加上css的引用
    <LINK REL="stylesheet" Type="text/css" HREF="Styles.css">
    还是不起作用。
    这到底是那里出错了 呢?
    谢谢前辈!
      

  10.   

    现在是,我用A这种方式,还是另外起名,比如用aa,然后把HyperLink控件的cssClass属性设置为aa,
    这HTML中加上css的引用
    <LINK REL="stylesheet" Type="text/css" HREF="Styles.css">
    还是不起作用。
    这到底是那里出错了 呢?
    谢谢前辈!
      

  11.   

    如果你在CSS中设置的是
    A
    {……}
    A:active
    {……}
    A:hover
    A:link
    {……}
    A:visited
    {……}
    那么在HTML中<a href>是不需要加样式的,即不用再写class="**"这样的属性。
    在CSS(即样式表中,如果想直接表示一个控件的属性,比如TD,就可以直接写TD{……},但这样造成的问题是在页面中所有的TD都会遵循这个样式;
    而更多采用的方式是.aa{....}这样的CSS(注意前面有个“.”),这种时候我们才可以放置在HTML的样式中使用,即:<a href="……" class="aa">(注意这里就不需要点了,但在CSS中就一定要加上点)建议你处理这些之前仔细看一下CSS样式表的说明,希望对你有帮助
      

  12.   

    谢谢前辈指点!
    现在我用两种方式都不能使css起作用!郁闷阿!
      

  13.   

    我仔细看了一个你的说明,A属性是针对<a>标记的,不是<asp:HyperLink>标记。
    你改成<a href=""></a>这种的
      

  14.   

    看一下,<asp:HyperLink>在生成客户端之后(在ie中右击,然后查看源文件)是什么东东,如果不是<a>这种,那可能不行~~~
      

  15.   

    我给你一个建议吧,做界面你可以用DreamWeaver。
    你用DreamWeaver创建ASP.NET程序,然后 菜单->修改->页面属性->连接->始终无下划线§§变换图象连接:选择你要的颜色。
    很简单。如果你想了解是怎么实现的,你可以看到生成的CSS样式代码,
    <style type="text/css">
    <!--
    a:link {
    text-decoration: none;
    }
    a:visited {
    text-decoration: none;
    }
    a:hover {
    text-decoration: none;
    color: #0066FF;
    }
    a:active {
    text-decoration: none;
    }
    -->
    </style>