Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CSS Pseudo Classes
Search
Frontend NE
August 29, 2015
Technology
0
460
CSS Pseudo Classes
Elizabeth Gardiner take Frontend NE through CSS pseudo selectors and pseudo classes
Frontend NE
August 29, 2015
Tweet
Share
More Decks by Frontend NE
See All by Frontend NE
Standardizing 'select': What the future holds for HTML - Stephanie Stimac @ FrontendNE
frontendne
4
410
CSS Regression testing - James A Lambert @ FrontendNE
frontendne
1
340
Building a design system for Lloyds Banking - Lilly Dart @ FrontendNE
frontendne
0
1.5k
What I learnt about hiring diverse teams from conducting a fully-anonymous recruitment process - Bethan Vicent
frontendne
0
290
Web Design that Doesn't Make Trans People Uncomfortable - Jessica Kelsall
frontendne
0
750
Contain yourself - Docker for developers
frontendne
2
270
Design process of a website
frontendne
0
320
What the JAMstack?
frontendne
1
940
Talking the talk
frontendne
0
510
Other Decks in Technology
See All in Technology
Amazon S3 Vectorsを使って資格勉強用AIエージェントを構築してみた
usanchuu
3
450
ブロックテーマ、WordPress でウェブサイトをつくるということ / 2026.02.07 Gifu WordPress Meetup
torounit
0
170
Codex 5.3 と Opus 4.6 にコーポレートサイトを作らせてみた / Codex 5.3 vs Opus 4.6
ama_ch
0
120
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.6k
~Everything as Codeを諦めない~ 後からCDK
mu7889yoon
3
310
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
210
Oracle Cloud Observability and Management Platform - OCI 運用監視サービス概要 -
oracle4engineer
PRO
2
14k
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
210
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
340
変化するコーディングエージェントとの現実的な付き合い方 〜Cursor安定択説と、ツールに依存しない「資産」〜
empitsu
4
1.3k
生成AI時代にこそ求められるSRE / SRE for Gen AI era
ymotongpoo
5
3k
広告の効果検証を題材にした因果推論の精度検証について
zozotech
PRO
0
150
Featured
See All Featured
Thoughts on Productivity
jonyablonski
74
5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The Curious Case for Waylosing
cassininazir
0
230
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.5k
The SEO identity crisis: Don't let AI make you average
varn
0
67
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Between Models and Reality
mayunak
1
180
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
Un-Boring Meetings
codingconduct
0
200
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
72
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}