Pradeep Pandey Profile picture
Mar 15 14 tweets 4 min read
Master CSS Pseudo-elements🎯

A Thread 🧵👇
❓What exactly is a pseudo-element?

📌 A CSS pseudo-element is used to style specified parts of an element.

For example, it can be used to:

🔳 Style the first letter, or line, of an element.

🔳 Insert content before, or after, the content of an element.
📌 Presently, There are some pseudo-elements that are commonly used , and some experimental ones.

Below I have given a detailed explanation👇
✨ Common Pseudo-Elements

➡️ ::before

➡️ ::after

➡️ ::first-letter

➡️ ::first-line

➡️ ::selection

✨ Experimental Pseudo-Elements

➡️ ::placeholder

➡️ ::backdrop

➡️ ::marker
📌 You can use any of these pseudo-elements by simply adding them at the end of your CSS selector.

Like so.👇
🎯 ::before and ::after Pseudo-Elements

🔳::before ➖ used to insert some content before the content of an element.

🔳::after ➖ used to insert some content before the content of an element.

Here is a simple example👇
☝️ In the above example the ::before element get placed so it will be moved left and top-25 and appear on the box.

🔳 Same is the case with the ::after element, it gets moved right and top -25. You can see the above example.
🤔 Now, you must be wondering why the content was left blank.?

🔳 Ans. - The content property is mandatory in order to render the ::before and ::after elements.

It can hold an empty value, a text, or an image by giving it an URL("image.png").
🎯::first-letter and ::first-line

📌 These pseudo-elements are a great way to manipulate text content.
They do exactly what their name says, which is to allow you to select the first letter or first line of some text.

Here is an example
🎯:: Selection

📌 Selection pseudo-element allows us to customize properties of the user's text selection either for our entire website, or for certain parts of it. Only certain properties can be applied.

here’s how it works:
🎯 Experimental pseudo-elements

➡️ Placeholder (::placeholder)

🔳 this pseduo Element is used in order to change the css properties of your input's placeholder text inserted through the placeholder attribute.
➡️ Marker (::marker)

📌 You can use it to change the properties of a marker element.

For example, select your list's bullet points and change their color:
➡️ Backdrop (::backdrop)

🔳 Styles the background of a full-screen element, such as a video.
Here is an example.
End of the thread. 🧵

If you found this thread useful, please consider:

💛 Liking these tweets

🔁 Retweet the first tweet so others can see it.

👤 Following me ( @itsmeprdp )for more content.

Thanks for reading.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Pradeep Pandey

Pradeep Pandey Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @itsmeprdp

Mar 14
All About HTML Inputs🎯

A Thread 🧵👇
❓ What are inputs?

📌 Inputs are the fields where users can fill in their info, passwords, email, and much more.

There are a variety of inputs but we can categorize them into 5 groups.
🎯 Input Categories

1. General Inputs
2. Duration Inputs
3. Media Inputs

4. Option Inputs
5. Advance Inputs
Read 10 tweets
Mar 13
Do you know about CSS cursor Property in CSS ?

What is the use of Cursor Property?

Let's understand👇

#100DaysOfCode
#webdevelopment
📌 The cursor property specifies the mouse cursor to be displayed when pointing over an element.

📌 They support multiple conditions depending on what the website interface state is at the current moment.
➡️ For example, you might need a loading state cursor while loading items.

📌 This tells the users that something is in progress in the background, and they need to wait until the fetching finishes.
Read 9 tweets
Mar 13
Roadmap to become a Web developer🧬

A Thread 🧵

#100DaysOfCode
#Webdevelopment
There 3 parts to web development:

- Frontend
- Backend
- FullStack

Make sure to read about these parts of web development.👇
1. Frontend

- HTML
- CSS
- Git and Github
- JavaScript
- Frameworks React/Vue/Angular
- Testing ~> Jest
Read 7 tweets
Mar 12
What is the !important property in CSS ?

Let's understand 👇

#100DaysOfCode
#webdevelopment
The !important property in CSS is used to provide more weight (importance) than normal property.

!important means that “this is important”, ignore all the subsequent rules, and apply !important rule.
!important keyword must be placed at the end of the line, immediately before the semicolon.

see the example👇 ImageImage
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(