Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 为什么链接有不同的颜色?_Html - Fatal编程技术网

Html 为什么链接有不同的颜色?

Html 为什么链接有不同的颜色?,html,Html,我很惊讶为什么这些链接有不同的颜色?下面是代码 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ka-ge" lang="ka-ge" > <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> </head> <style> #links { margin: 0 aut

我很惊讶为什么这些链接有不同的颜色?下面是代码

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ka-ge" lang="ka-ge" >
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>
<style>

#links { 
    margin: 0 auto; 
    width: 4800px; 
    font-size:70px;
    clear: both; 
    display: block;

}
#test a {
    float: right;
}
</style>
<body bgcolor="green" >
<a href="indexE.html"><img src ='english.gif' style="float:right"  width="88" height="88"> </a>
<a href="indexR.html"><img src ='russian.gif' alt="Russian flag" style="float:right"  width="88" height="88"/></a>
<a href="index.html"> <img src="georgian.jpg"  style="float:right" width="88" height="88"/></a>
<div id="links">
<a href=" index.html " >მთავარი </a>
&nbsp;
<a href=" ბაკურიანი.html ">ბაკურიანი </a>
&nbsp;
<a href=" გუდაური.html ">გუდაური </a>
&nbsp;
<a href=" ზღვა.html ">ზღვა </a>
&nbsp;
<a href=" კახეთი.html ">კახეთი </a>
&nbsp;
<a href=" სვანეთი.html ">სვანეთი </a>
&nbsp;
<a href=" ვარძია.html ">ვარძია </a>
&nbsp;
<a href=" ქართლი.html ">ქართლი </a>
&nbsp;
<a href=" ძველი_თბილისი.html ">ძველი_თბილისი </a>
</div>
</body>
</html>

#链接{
保证金:0自动;
宽度:4800px;
字体大小:70px;
明确:两者皆有;
显示:块;
}
#测试a{
浮动:对;
}

当我在谷歌chrome上运行这个程序时,所有的东西都有相同的颜色,除了ზღვა(海),კახეთი(卡赫蒂),ვარძია(瓦尔迪亚),ქართლი(qartli)所有这些名称都是蓝色的,而其他名称是其他颜色的,你能告诉我为什么是这样吗?

这些是
:已访问的
:活动的
的默认样式

:visited选择器用于选择已访问的链接

:活动选择器用于选择活动链接并设置其样式

当您单击链接时,它将变为活动链接

编辑:要使它们具有相同的样式,可以执行以下操作:

a, a:active, a:visited {
    color: red;
}

这将样式正常链接,活动链接和访问的链接。您还可以使用:hover进行滚动。

我如何更改代码,使所有链接的颜色都相同?此声明应单独声明,或者在#links stylea中选择任何标记。如果你把它按原样放在CSS中,它会将它们全部设置为红色。