CSS:a:Safari和Firefox未正确显示访问

CSS:a:Safari和Firefox未正确显示访问,css,firefox,safari,Css,Firefox,Safari,我已经为链接设置了下面的CSS。此代码生成此 在Firefox中:链接为灰色,焦点和悬停为白色,但访问后不会变成粉红色 在Safari中:链接为灰色,焦点和悬停为白色,访问时变为粉红色,但在刷新/清空缓存/重置Safari后不会重置为灰色 a { display: block; text-decoration: none; font-weight: normal; } a:link { color: grey; } a:visited { text-de

我已经为链接设置了下面的CSS。此代码生成此

在Firefox中:链接为灰色,焦点和悬停为白色,但访问后不会变成粉红色

在Safari中:链接为灰色,焦点和悬停为白色,访问时变为粉红色,但在刷新/清空缓存/重置Safari后不会重置为灰色

a {
  display: block;
  text-decoration: none;
  font-weight: normal;
}           
a:link {
  color: grey;
}
a:visited {
  text-decoration: none;
  color: pink;
}
a:focus {
  color: white;
}
a:active, 
a:hover {
  text-decoration: none;
  color: white;
}
请帮助?

编辑:

在Firefox中,进入工具->选项->内容(选项卡)->颜色->并选中“允许页面选择自己的颜色”。这将允许您查看自己的颜色

可能没有使用正确的顺序:

a:link
a:visited
a:hover
a:active
a:focus
按如下方式订购代码:

a {
  display: block;
  text-decoration: none;
  font-weight: normal;
}           
a:link {
  color: grey;
}
a:visited {
  text-decoration: none;
  color: pink;
}
a:hover,
a:active {
  text-decoration: none;
  color: white;
}
a:focus {
  color: white;
}

编辑了我的答案以包含对首选项的更改:在Firefox中,转到工具->选项->内容(选项卡)->颜色->并选中“允许页面选择自己的颜色”。这应该允许您查看CSS访问的颜色。只需选中该选项,它就已经设置为“允许页面选择自己的颜色”。