css link visited background


For some reason visited background no change to gray color. Anyone know how to fix?

a:link {
  height: auto;
  display: inline-block;
  border-radius: 5px;
  background: rgb(241,231,103);
  background: linear-gradient(to bottom, rgb(241,231,103) 0%, rgb(241,231,103) 32%, rgb(248,217,54) 73%, rgb(253,208,22) 100%);

a:visited {
  background-color: gray;

a:hover {
  background: linear-gradient(to bottom, rgb(253,208,22) 0%, rgb(248,217,54) 27%, rgb(241,231,103) 68%, rgb(241,231,103) 100%);

HTML file, I need to use css in my task

<meta charset="UTF-8">
<link rel="stylesheet" href="css/style.css">

<a href="http://www.stackoverflow.com">one</a>
<a href="#">two</a>
<a href="#">three</a>
<a href="#">seven</a>


Try to set a default background color to your link, for example white

  background-color: white;


a:visited {
  background-color: gray;