超链接的颜色 [英] Color of hyperlink

查看:241
本文介绍了超链接的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我有< h1>是在黑色背景上的白色字体的横幅。我正在使用CSS

将横幅设为白色黑色。


我想超链接这些字,但我想强制超链接

由于超链接而保持白色而不是改变颜色。只需

的横幅超链接 - 不是整个页面的其他超链接。


有没有办法强制横幅超链接保持白色?


谢谢,


Bob

Hello,

I have an <h1> banner that is white font on black background. I am using CSS
to style the banner in white on black.

I would like to hyperlink the words, but I want to force the hyperlink to
remain white in color rather than changing colors due to the hyperlink. Just
for the banner hyperlinks - not for the whole page with other hyperlinks.

Is there a way to force the banner hyperlink to remain white?

Thanks,

Bob

推荐答案

Bob写道:
Bob wrote:
你好,

我有一个< h1>是在黑色背景上的白色字体的横幅。我正在使用CSS
将横幅设为白色黑色。

我想超链接的话,但我想强制超链接保持白色而不是而不是由于超链接改变颜色。只是
的横幅超链接 - 不是整个页面与其他超链接。

有没有办法强制横幅超链接保持白色?
Hello,

I have an <h1> banner that is white font on black background. I am using CSS
to style the banner in white on black.

I would like to hyperlink the words, but I want to force the hyperlink to
remain white in color rather than changing colors due to the hyperlink. Just
for the banner hyperlinks - not for the whole page with other hyperlinks.

Is there a way to force the banner hyperlink to remain white?




后续设置为ciwas。


h1 a {color:white; }


-

Mark。
http://tranchant.plus.com/


Bob写道:
Bob wrote:
你好,

我有一个< h1>横幅是黑色背景上的白色字体。我正在使用CSS在黑色上将白色横幅设置为风格。

我想超链接这些单词,但我想强制
超链接保持白色而不是而不是由于超链接改变颜色。只是为了横幅超链接
- 不是整个页面与其他超链接。

有没有办法强制横幅超链接保持白色?
Hello,

I have an <h1> banner that is white font on black
background. I am using CSS to style the banner in white on
black.

I would like to hyperlink the words, but I want to force
the hyperlink to remain white in color rather than changing
colors due to the hyperlink. Just for the banner hyperlinks
- not for the whole page with other hyperlinks.

Is there a way to force the banner hyperlink to remain
white?




是< h1>唯一的< h1>在页面上有超链接?

在这种情况下:

h1 a:link,h1 a:visited,h1 a:hover,h1 a:active {

颜色:白色;

背景颜色:黑色;

}


如果不是'' t,将它包装在一个带有类的div中。


-

Els http://locusmeus.com/

Sonhos vem。 Sonhos v?o。 Orestoébritfeito。

- Renato Russo -

现在播放:The Scene - Kans



Is the <h1> the only <h1> with hyperlinks in it on the page?
In that case:
h1 a:link, h1 a:visited, h1 a:hover, h1 a:active{
color:white;
background-color:black;
}

If it isn''t, wrap it in a div with a class.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos v?o. O resto é imperfeito.
- Renato Russo -
Now playing: The Scene - Kans


" Bob" ; < ergobob @ sonic [no spam] .net>写道:
"Bob" <ergobob@sonic[no spam].net> writes:
我有一个< h1>是在黑色背景上的白色字体的横幅。我正在使用CSS
将横幅设为白色黑色。

我想超链接的话,但我想强制超链接保持白色而不是而不是由于超链接改变颜色。只是
的横幅超链接 - 不是整个页面与其他超链接。

有没有办法强制横幅超链接保持白色?
I have an <h1> banner that is white font on black background. I am using CSS
to style the banner in white on black.

I would like to hyperlink the words, but I want to force the hyperlink to
remain white in color rather than changing colors due to the hyperlink. Just
for the banner hyperlinks - not for the whole page with other hyperlinks.

Is there a way to force the banner hyperlink to remain white?




是的。


在你做之前,考虑两件事:


1)用户应该如何知道它'是链接?

1a)他们如何判断是访问还是未访问?

2)它到底是什么链接?如果你正在使用< h1>正确 - 对于

一个页面标题 - 那么它链接到什么?如果你正在使用< h1>只需

即可获得大文字,然后不要 - 使用CSS来设计别的东西

看起来正确。


在某些情况下,它们可能并不重要。但一般情况下,它非常重要。你可能有一个重要的地方 - 如果你想要确认,可以发一个URL

的例子。


如何:

使用CSS。你需要查找''后代选择器''(或使用

内联样式,但这不是一个好主意,除了测试)和

''color''和''background''属性。


-

Chris



Yes.

Before you do, consider two things:

1) How is the user supposed to know it''s a link?
1a) How do they tell whether it''s visited or unvisited?
2) What on earth is it linking to? If you''re using <h1> properly - for
a page title - then what does it link to? If you''re using <h1> just
to get big text, then don''t - use CSS to style something else to
look right.

In a few contexts they may be unimportant. But generally it''s quite
important. You probably have one where it is important - post a URL
with an example if you want that confirming.

For the how:
Use CSS. You''ll need to look up ''descendant selectors'' (or use
inline styles, but that''s not a good idea except for testing) and the
''color'' and ''background'' properties.

--
Chris


这篇关于超链接的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆