How can I change the colour of hyperlinks to white in HTML and CSS?
如何在HTML和CSS中将超链接的颜色更改为白色?
4 个解决方案
#1
26
Use the color CSS property.
使用颜色CSS属性。
a { color: white; }
Problem is, visited links may not be shown as white as well. You may need to add extra rules:
问题是,访问过的链接也可能不会显示为白色。您可能需要添加额外的规则:
a, a:hover, a:active, a:visited { color: white; }
#2
8
You use CSS
你使用CSS
a
{
color: #ffffff;
}
Anchor Pseudo-classes: http://www.w3schools.com/CSS/css_pseudo_classes.asp
Anchor Pseudo-classes:http://www.w3schools.com/CSS/css_pseudo_classes.asp
#3
5
just guessing, you may be looking for these as well:
只是猜测,你可能也在寻找这些:
a:link
{
color:#FFFFFF;
}
a:visited
{
color:#FFFFFF;
}
a:hover
{
color:#FFFFFF;
}
#4
4
a { color: #fff; }
in your css file. I will add that if you're doing it to try and hide many white links on a white background of a page it is a very bad idea.
在你的css文件中。我将补充一点,如果你这样做是为了尝试在页面的白色背景上隐藏许多白色链接,那么这是一个非常糟糕的主意。
#1
26
Use the color CSS property.
使用颜色CSS属性。
a { color: white; }
Problem is, visited links may not be shown as white as well. You may need to add extra rules:
问题是,访问过的链接也可能不会显示为白色。您可能需要添加额外的规则:
a, a:hover, a:active, a:visited { color: white; }
#2
8
You use CSS
你使用CSS
a
{
color: #ffffff;
}
Anchor Pseudo-classes: http://www.w3schools.com/CSS/css_pseudo_classes.asp
Anchor Pseudo-classes:http://www.w3schools.com/CSS/css_pseudo_classes.asp
#3
5
just guessing, you may be looking for these as well:
只是猜测,你可能也在寻找这些:
a:link
{
color:#FFFFFF;
}
a:visited
{
color:#FFFFFF;
}
a:hover
{
color:#FFFFFF;
}
#4
4
a { color: #fff; }
in your css file. I will add that if you're doing it to try and hide many white links on a white background of a page it is a very bad idea.
在你的css文件中。我将补充一点,如果你这样做是为了尝试在页面的白色背景上隐藏许多白色链接,那么这是一个非常糟糕的主意。