I am learning from a website tutorial and I stumbled across active and is-active in the JS code. I checked the HTML code and those are not classes. Furthermore, they do not start with a dot as classes do. I know that active is a CSS selector, but I have never seen is-active before. Could you please explain that to me? Thank you very much.
CodePudding user response:
There is no is-active css stuff.
For the :active, it is a selector to trigger something when you click on an element. Example:
html:
<p>Hello world</p>
css:
p:active {
color:white;
background-color:black;
}
This will make the
turn into white color over black background when you click and hold on to it.
CodePudding user response: