Home>

I created a button with CSS.
I want to change the color of visited links, and I added a: visited to CSS, but it doesn't display correctly.

The code for the button below shows "I've done this".
If there is something wrong with the description or order, I would like you to point it out and display "I want this to happen."
Thank you very much.

.BUTTON_1 {
   background: # F9CFD3;
   background-image: -webkit-linear-gradient (top, # F9CFD3, # F9A9AE);
   background-image: linear-gradient (to bottom, # F9CFD3, # F9A9AE);
   border-radius: 20px;
   color: #FFFFFF;
   font-family: '游 Gothic', 'Yu Gothic', sans-serif! important;
   font-size: 40px;
   width: 98%;
   font-weight: 100;
   padding: 47px 40px 40px 40px;
   text-shadow: 1px 1px 20px #FFFFFF;
   text-decoration: none;
   display: inline-block;
   cursor: pointer;
}
.BUTTON_1: hover {
   color: #FFFFFF;
   background: # F9A9AE;
   background-image: -webkit-linear-gradient (top, # F9A9AE, # F9CFD3);
   background-image: linear-gradient (to bottom, # F9A9AE, # F9CFD3);
}
.BUTTON_1: visited {
  color: # EC779F
}
  • Answer # 1

    Is it because you already clicked on that link?
    How about cache deletion or super reload?

    How to clear the cache with Chrome and Firefox (super reload, hard cache clear)

    Summary of how to delete Chrome cache completely.

    * Pseudo class description order is: link →: visited →: hover →: active

    The order of writing: link,: visited,: hover,: active and how to remember it

  • Answer # 2

    : visitedand: hoverhave the same level of detail (CSS's "strength"), so I wrote it aftertakes precedence.

    : hoverIf you want to give priority, set: hoverafter: visited.