Practical Way of Using Pseudo Selector in CSS

๐ Hey! I'm Prakash Naikwadi. I have a Bachelor's degree in Computer Engineering๐คฉ
I am currently learning๐ ๐๐๐๐ ๐๐ญ๐๐๐ค ๐๐๐ฏ๐๐ฅ๐จ๐ฉ๐ฆ๐๐ง๐ญ.
๐ ๐๐ข๐ญ๐๐ฎ๐ ๐๐ซ๐จ๐๐ข๐ฅ๐: https://github.com/prakash-naikwadi
๐๐๐ซ๐ ๐๐ซ๐ ๐๐จ๐ฆ๐ ๐ฌ๐ค๐ข๐ฅ๐ฅ๐ฌ๐๐ญ๐ฌ ๐ญ๐ก๐๐ญ ๐ ๐๐จ๐ฌ๐ฌ๐๐ฌ๐ฌ๐๐...
๐
๐ซ๐จ๐ง๐ญ ๐๐ง๐:
โข HTML5 (Intermediate Level)
โข CSS (Intermediate Level)
โข JavaScript
โข React
๐๐ซ๐จ๐ ๐ซ๐๐ฆ๐ฆ๐ข๐ง๐ ๐๐๐ง๐ ๐ฎ๐๐ ๐๐ฌ: โข Java โข C โข C++
Thank you for reading. Have a wonderful day๐ค
There are a lot of pseudo selectors in CSS & remembering all of them is not possible, but we are going to talk about the most commonly used selectors and most here.
โDesigning Links and Buttons using LVHA Rule
- LVHA refers to Link, Visited, Hover, and Active pseudo-classes.
- When we want to design a link or button just select pseudo-classes in LVHA order.
- This LVHA order is important because if we use the :link after :hover, the :link will override all the properties of hover because they are equally specific.
.btn--full:link,
.btn--full:visited {
background-color: #e67e22;
color: #fff;
}
.btn--full:hover,
.btn--full:active {
background-color: #cf711f;
}
๐ฆ :link
The :link selector is a pseudo-class that targets all anchor <a> elements on a page that have an href attribute.
๐ฆ :visited
The :visited pseudo-class selector can change some of the styling on an anchor link <a> element if the userโs browser has already visited the link.
Itโs meant to help users distinguish the difference between links they have and havenโt visited.
๐ฆ :hover
The :hover pseudo-class in CSS selects elements when the mouse cursor is currently over them. Itโs commonly associated with link <a> elements.
๐ฆ :active
The :active pseudo selector changes the appearance of a link while it is being activated (being clicked on or otherwise activated).
Itโs usually only seen for a split second and provides visual feedback that the element was indeed clicked.
โPosition and Number-based pseudo-class selectors
Below Are Position and Number-based pseudo selectors

Reference
https://css-tricks.com/pseudo-class-selectors/




