CSS:访问过的选择器没有做任何改变?

时间:2016-09-09 22:41:29

标签: html css

a:visited选择器根本没有改变。关于订购LVHA,我读过很多地方甚至是stackoverflow解决方案(link> VISITED> HOVER> ACTIVE)。另外我读了一些现代浏览器不允许:出于安全目的访问,但我不确定。我的下面的代码不起作用:(

.anchor-list li a {
  color: orange;
}
.anchor-list li a:link {
  text-decoration: none;
  color: red;
}
.anchor-list li a:visited {
  text-decoration: underline;
  color: green;
}
.anchor-list li a:hover {
  text-decoration: underline;
  color: yellow;
}
.anchor-list li a:active {
  text-decoration: underline;
  color: blue;
}
<ul class="anchor-list">
  <li><a href="http://google.com">All games</a>
  </li>
  <li><a href="index.html">Online action games</a>
  </li>
  <li><a href="http://google.com">Two players game</a>
  </li>
  <li><a href="http://google.com">Most popular games</a>
  </li>
  <li><a href="http://google.com">Educational games</a>
  </li>
</ul>

0 个答案:

没有答案