一个< a>标签不继承父标签的颜色属性?

问题描述:

这是我的代码:

.blue {
    color:#6E99E1;
    font-size:9px;
}

<span class="blue">::<a href="/equipment_new.php">CLICK HERE</a>:: to view our New Equipment inventory. <br /><br /></span>

我以某种方式触发了一些阻止<a>标签继承父级<span>颜色的操作.

I've somehow triggered something that prevented the <a> tag from inheriting color of parent <span>.

默认情况下,如果存在href属性,则定位标记不会继承诸如color之类的属性.

By default an anchor tag does not inherit attributes like color if an href attribute is present.

在页面上查看这两者之间的区别:

Check out the difference between these two on a page:

<span style=color:green><a href="t">test</a></span>
<span style=color:green><a>test</a></span>

以下链接是w3 c:

http://www.w3.org/TR/html401/struct/links.html#h-12.2

用户代理通常在以下位置呈现链接 使其变得明显的方式 用户(下划线,反向视频, 等等.).确切的渲染取决于 用户代理.渲染可能会有所不同 根据用户是否有 是否已经访问了链接.

User agents generally render links in such a way as to make them obvious to users (underlining, reverse video, etc.). The exact rendering depends on the user agent. Rendering may vary according to whether the user has already visited the link or not.

.....

通常,A的内容不是 当A时以任何特殊方式呈现 仅定义一个锚点.

Usually, the contents of A are not rendered in any special way when A defines an anchor only.