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
500
CSS Regression testing - James A Lambert @ FrontendNE
frontendne
1
410
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
370
Web Design that Doesn't Make Trans People Uncomfortable - Jessica Kelsall
frontendne
0
830
Contain yourself - Docker for developers
frontendne
2
340
Design process of a website
frontendne
0
400
What the JAMstack?
frontendne
1
1.1k
Talking the talk
frontendne
0
600
Other Decks in Technology
See All in Technology
AIがGISを代替する日:〜すべてをAIが創る時代に、私たちがFOSS4Gに関わる意味〜
lehupa
1
220
自治体AIコンタクトセンター、何をどこに任せる?~Amazon Connect Customer +Amazon Bedrockの実践知~ / 20261107 Satoshi Torano
shift_evolve
PRO
1
130
AWS Quick 入門 | 目指せ Quick マスター 01
inariku
PRO
2
290
GCASアップデート(202607-202610)
techniczna
1
250
田んぼの見回りをIoTで減らしたい!水位監視から電池駆動カメラまでの試行錯誤
itosoft
1
110
Shared Signals Framework 仕様解説
oidfj
0
350
Agent Harnessはどう作る?事例から学ぶAI Agentの設計思想
sergicalsix
0
240
Sizing, Benchmarking and Performance Tuning Apache Flink Clusters
rmetzger
0
150
AI Agent 時代のデータ基盤: ClickHouse で実現する 超高速分析とコスト削減の両立
jozono
0
230
AI時代の組織作り:チーム開発から「個人×AI」への移行と、持続可能な「開発資本」の築き方
ham0215
2
810
属人化したISMS運用をGitHubとAIで仕組み化した1年間の記録
sioncojp
4
2k
「AIチャットからもできないの?」と言われたら ~業務アプリをMCP対応するときの認証・認可の勘所
oidfj
0
280
Featured
See All Featured
We Are The Robots
honzajavorek
0
440
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
460
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
380
What's in a price? How to price your products and services
michaelherold
247
13k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.3k
Designing Experiences People Love
moore
143
24k
SEO for Brand Visibility & Recognition
aleyda
0
4.9k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
680
Designing for Timeless Needs
cassininazir
1
560
WENDY [Excerpt]
tessaabrams
14
40k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
470
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
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}