CSSA: Visited question!!

Asked 1 weeks ago, Updated 1 weeks ago, 2 views

Hello! I'm Corinne, 2 months old, and I started learning on my own at the front end!

I was practicing site clone coding using CSS I want to make an underline even if I move the mouse to another place once I click like that picture

From html

 <div class="gallery2-intro">
          <div>WOMEN'S SS22</div>
          <div>MEN'S SS22</div>
  </div>

I do that In the CSS,

.gallery2-intro > div:visited {
  text-decoration: underline;
  text-underline-position: under;
}

I did, but visited is not applicable. I thought I wrote it wrong, so if I change it to hover, it applies I was wondering if div is not available and can only be applied to tag A, so I can't change it to tag A crying I'd really appreciate it if you could answer me!

css

2022-09-20 10:49

1 Answers

I looked it up because I didn't know, but you can't give the text-decoration attribute to the :visited selector. The same goes for the other one. The reason is surprisingly security.

I have to look up the documents!


2022-09-20 10:49

If you have any answers or tips


© 2022 pinfo. All rights reserved.