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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Frontend NE
August 29, 2015
Technology
490
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
460
CSS Regression testing - James A Lambert @ FrontendNE
frontendne
1
380
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
330
Web Design that Doesn't Make Trans People Uncomfortable - Jessica Kelsall
frontendne
0
800
Contain yourself - Docker for developers
frontendne
2
310
Design process of a website
frontendne
0
360
What the JAMstack?
frontendne
1
1k
Talking the talk
frontendne
0
570
Other Decks in Technology
See All in Technology
AIが実装を自走する時代の認知負債との戦い
lycorptech_jp
PRO
2
1k
GoでCコンパイラを作った話
repunit
0
150
AICoEでAIネイティブ組織への進化
yukiogawa
0
210
そのドキュメント、自動化しませんか?
yuksew
1
370
探索・可視化・自動化を一本化 Amazon Quickでデータ活用スピードを上げる方法
koheiyoshikawa
0
150
生成AI×AWS CDK×AWS FISで"振り返れる"ミニGameDayをつくろう
yoshimi0227
2
500
凡エンジニアがこの先生きのこるためには。〜TypeScript完全に理解したい〜
alchemy1115
2
390
ソニー銀行におけるビジネスアジリティ向上のためのクラウドシフト戦略
srenext
0
1k
仕様駆動開発、導入半年。「本当に速くなってるの?」にデータで答える / AICon2026_hirakawa
rakus_dev
0
290
複数プロダクト組織のAIネイティブ化における戦略 / AICon2026_kude
rakus_dev
0
280
AI時代におけるエンジニアの新たな役割──FDEとクオリアの探求/登壇資料(戸井田 裕貴)
hacobu
PRO
0
250
ダッシュボード"開発"について 〜使われるダッシュボードのつくりかた〜
kimichan
0
110
Featured
See All Featured
Done Done
chrislema
186
16k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
640
Thoughts on Productivity
jonyablonski
76
5.3k
We Have a Design System, Now What?
morganepeng
55
8.2k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
360
AI: The stuff that nobody shows you
jnunemaker
PRO
9
840
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
900
How to Think Like a Performance Engineer
csswizardry
28
2.7k
Abbi's Birthday
coloredviolet
3
8.7k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Marketing to machines
jonoalderson
1
5.6k
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}