In this FullStackWebDevelopment tutorial video, In this video, we are going to learn about CSS specificity. #CSS #Specificity is the set of the rules applied to CSS #selectors in order to determine which style is applied to an element.
The more specific a CSS style is, the higher point value it accrues, and the likelier it is to be present on the element's style. Every selector has its place in the specificity hierarchy. There are four categories which define the specificity level of a selector:
IDs - An ID is a unique identifier for the page elements, such as #navbar.
Classes, attributes and pseudo-classes - This category includes .classes, [attributes] and pseudo-classes such as :hover, :focus etc.
Elements and pseudo-elements - This category includes element names and pseudo-elements, such as h1, div,: before and: after.
SPECIFICITY Rules:
Equal specificity: the latest rule counts - If the same rule is written twice into the external style sheet, then the lower rule in the style sheet is closer to the element to be styled, and therefore will be applied:
ID selectors have a higher specificity than attribute selectors
A class selector beats any number of element selectors
.
----------------------------
Week 1: Day 3
Section 2: Getting Started With CSS
Tutorial 16: Specificity in CSS
----------------------------
Do subscribe and hit Bell Icon
----------------------------
Follow us in social media handles for opportunities and code related support.
Instagram: [ Ссылка ]
Facebook: [ Ссылка ]
Twitter: [ Ссылка ]
LinkedIn: [ Ссылка ]
Be our Exclusive student / Patreon to receive Exclusive Coding Tips and Freelancing opportunities
Patrons: [ Ссылка ]
----------------------------
Got a question on the topic? Please share it in the comment section below and our experts will answer it for you.
For more information, please write back to us at hi@wbweb.co.in or call us at IND: 7077568998
After completing the course, write to biswabijaya@wbweb.co.in for an internship or Full stack web development based freelancing opportunities.
For consultation or partnership, related queries drop a mail to hi@wbweb.co.in.
Ещё видео!