Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
CSS Pseudo Classes
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Frontend NE
August 29, 2015
Technology
500
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CSS Pseudo Classes
Elizabeth Gardiner take Frontend NE through CSS pseudo selectors and pseudo classes
Frontend NE
August 29, 2015
More Decks by Frontend NE
See All by Frontend NE
Standardizing 'select': What the future holds for HTML - Stephanie Stimac @ FrontendNE
frontendne
4
490
CSS Regression testing - James A Lambert @ FrontendNE
frontendne
1
400
Building a design system for Lloyds Banking - Lilly Dart @ FrontendNE
frontendne
0
1.6k
What I learnt about hiring diverse teams from conducting a fully-anonymous recruitment process - Bethan Vicent
frontendne
0
360
Web Design that Doesn't Make Trans People Uncomfortable - Jessica Kelsall
frontendne
0
820
Contain yourself - Docker for developers
frontendne
2
330
Design process of a website
frontendne
0
390
What the JAMstack?
frontendne
1
1k
Talking the talk
frontendne
0
590
Other Decks in Technology
See All in Technology
ai_cording_with_k8s_knowledge.pdf
mochizuki875
1
300
オブザーバビリティを高める AI エージェント体験を考える / Designing AI Agent Experiences That Enhance Observability
aoto
PRO
2
310
いちAWSエンジニアのAI活用を振り返る #devio2026 / devio osaka 2026 kawahara
masahirokawahara
2
390
並行性の問題を防げ!実践トランザクション入門
occhi
0
280
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
160
雪かき部 #7 もう怖くない!SELECT文!
foursue
0
280
実体験から学ぶ分析エージェントの開発と運⽤
recruitengineers
PRO
1
270
Incremental HTTP
kazuho
5
2.1k
『GOエコノミー 』(相乗りサービス) におけるスペック駆動開発
mot_techtalk
1
310
[2026 Oracle Technical Deep Dive] エンタープライズAIエージェントを支えるOCIソリューション。ラインナップと特徴を理解しよう! (2026年9月17日開催)
oracle4engineer
PRO
0
550
[2026 Oracle Technical Deep Dive] Apache Iceberg × Oracle AI Database -Oracle Autonomous AI Lakehouseが実現するAI時代のデータ基盤- (2026年9月17日開催)
oracle4engineer
PRO
0
120
Futexes the good, the bad, the ugly
ennael
PRO
0
130
Featured
See All Featured
KATA
mclloyd
PRO
35
16k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
860
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
570
Embracing the Ebb and Flow
colly
88
5.2k
Ethics towards AI in product and experience design
skipperchong
2
410
Side Projects
sachag
456
43k
Statistics for Hackers
jakevdp
799
230k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
300
We Are The Robots
honzajavorek
0
390
It's Worth the Effort
3n
188
29k
Typedesign – Prime Four
hannesfritz
42
3.2k
Transcript
Pseudo-classes Elizabeth Gardiner {@libwella}
http://www.w3schools.com/css/css_pseudo_classes.asp “A pseudo-class is used to define a special state
of an element.”
http://www.thefreedictionary.com/Psuedo pseu•do (ˈsu doʊ) adj., n., pl. -dos. adj. 1.
false or spurious; sham; pretended. n. 2. a false or pretentious person.
None
Dynamic Pseudo-classes
:hover
:link :visited :hover :active
https://flic.kr/p/3ruY7o
:link o :visited e :hover :active t e
:link :visited :hover :active
:link :visited :hover :active :focus
:link :visited :hover :active :focus
None
:link :visited :hover :active :focus
:link :visited :hover :active :focus } :any-link (proposed CSS4)
:link :visited :hover :active :focus :local-link } :any-link (proposed CSS4)
(proposed CSS4)
Structural Pseudo-classes
THE DOM!
https://flic.kr/p/9GVpoG
<ul> <li> <li> <li> <li> <li> <li> https://flic.kr/p/9GVpoG
HTML BODY UL li li li li li li
:nth-child
:nth-child(n)
:nth-child(3) <ul> <li> <li> <li> <li> <li> <li> https://flic.kr/p/9GVpoG
:first-child :last-child :first-of-type :nth-last-child :nth-of-type :nth-last-of-type :only-child :only-of-type :empty :blank
(CSS4 proposed)
:matches(CSS4 proposed) https://css-tricks.com/almanac/selectors/m/matches/
:target
BROWSER SUPPORT
DEMOS http://lea.verou.me/demos/ nth.html https://css-tricks.com/examples/ nth-child-tester/#
THE negation pseudo-class :not
Pseudo Elements
http://www.growingwiththeweb.com/2012/08/pseudo-classes-vs-pseudo- elements.html “A pseudo-element […] allows us to create items
that do not normally exist in the document tree”
::first-line ::first-letter ::before ::after
::first-line ::first-letter ::before ::after
https://css-tricks.com/pseudo- element-roundup/ http:// www.smashingmagazine.com/ 2011/07/13/learning-to-use-the- before-and-after-pseudo- elements-in-css/
Thanks! Elizabeth Gardiner {@libwella}