1

问题是默认颜色不适合我的背景...有人可以告诉我如何将页面底部的链接颜色更改为橙​​色 http://cisweb.bristolcc.edu/~jcharron17/ week8-javascript.html

还要在字段集中保留常规颜色吗? http://cisweb.bristolcc.edu/~jcharron17/

4

5 回答 5

2

换行

<a href="index.html">Return to the Index</a>

以以下方式在 div 内

<div id="footer">
<a href="index.html">Return to the Index</a>
</div>

然后在你的 head 标签里面,写下下面的 css

<style type="text/css">
    #footer a {
        color: #F16F01;
    }
</style>
于 2012-10-28T07:08:45.230 回答
1

现在,您没有任何 A 标记规范,并且您无法表明页面页脚下方的标记需要与默认设置不同的处理方式。

正如 Abhishek 的示例所指出的,您需要将这些链接包装在能够为其提供上下文的内容中。他选择了<div id="footer">,这很好,并且 HTML4+ 有效。

我自己可能会选择 HTML5 规范:

<footer>
    <a href="index.html">Return to the Index</a>
</footer>

此外,您需要注意所有链接默认具有的 :link、:visited、:hover 和 :active 状态。这就是为什么通常,为了确保您想要的颜色在所有状态下都保持该颜色,您可以像这样指定链接 CSS:

a, a:link, a:visited, a:hover, a:active {
    /* your specs here */
}

在上述情况下,您将执行以下操作:

<style type="text/css">
    #footer a, #footer a:link, #footer a:visited, #footer a:hover, #footer a:active {
        color: #F16F01;
    }
</style>

只是为了覆盖你所有的基地。

于 2012-10-28T07:18:36.570 回答
1

将此代码放在您的网站源代码的末尾.. 在 # 的位置提供您的链接,您将获得该文本的橙色

<a href="#"><font color="#F16F01">Return to the Index</font></a>
于 2012-10-28T13:03:27.947 回答
0

像这样添加class到标签a

<a href="index.html" class="orange">Return to the Index</a>

和 CSS 规则:

.orange { color: #F16F01; }
.orange:hover { color: #FF9900; }

或者您可以为所有链接使用新颜色,只需编写下一个 CSS 规则:

a { color: #F16F01; }
a:hover { color: #FF9900; }    
于 2012-10-28T09:15:21.557 回答
0
fieldset a{
   color: pink;
}

希望能帮到你

于 2012-10-29T14:03:09.800 回答