SlideShare une entreprise Scribd logo
1  sur  27
Télécharger pour lire hors ligne
IN A ROCKET
Learn front-end development at rocket speed
CSS CSS FUNDAMENTALS
Combinators
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
CHILD
Combinators
SIBLING
Combinators
DESCENDANT
Combinator
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
DESCENDANT COMBINATOR
Describe an element that is the descendant of another element in the document tree.
header .promo {color: green}
Syntax selectorOutsite selectorInside {style properties}
With this code all elements that have a class promo inside a header element are shown in green.
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
DESCENDANT COMBINATOR
header
.promo
.promo
header .promo
.div
.promo
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
DESCENDANT COMBINATOR
<body>
<header>
<h1 class="promo">Join us</h1>
<div>
<p class="promo">Subscribe to our newsletter!</p>
</div>
</header>
<h1 class="promo">Deals</h1>
<p class="promo">Enjoy a 10% discount.</p>
</body>
.promo { font-style: italic; }
header .promo { color: green; }
Web page title
index.html
Join us
Subscribe to our newsletter!
Deals
Enjoy a 10% discount.
READY TO USE CODE
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
CHILD
Combinator
SIBLING
Combinators
DESCENDANT
Combinators
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
CHILD COMBINATOR
Only targets immediate child elements.
header > .promo {color: green}
Syntax selectorOutsite > selectorInside {style properties}
With this code only the immediate child elements of header
that have a class promo are shown in green.
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
CHILD COMBINATOR
header
.promo
.promo
header > .promo
.div
.promo
>
.promo
>
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
CHILD COMBINATOR
header > .promo
!
>
>
header
"
.promo
"
.promo div
!
"
.promo
>
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
CHILD COMBINATOR
<body>
<header>
<h1 class="promo">Join us</h1>
<div>
<p class="promo">Subscribe to our
newsletter!</p>
</div>
</header>
</body>
.promo { font-style: italic; }
header > .promo { color: green; }
Web page title
index.html
Join us
Subscribe to our newsletter!
READY TO USE CODE
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
CHILD
Combinators
SIBLING
Combinator
DESCENDANT
Combinators
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
Sibling 

combinators
General
Adjacent
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
SIBLING COMBINATOR: GENERAL
Select elements based of sibling relationships.
h2 ~ p {color: green}
Syntax selectorA ~ selectorB {style properties}
With this code only the paragraphs that are siblings of h2 are shown in green.
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
SIBLING COMBINATOR: GENERAL
h2
h2 ~ p
p
div
p
p
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
SIBLING COMBINATOR: GENERAL
h2 ~ p
~
"
h2
"
p div
!
"
p
~
"
p
~
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
SIBLING COMBINATOR: GENERAL
<body>
<h2>Join us</h2>
<p>Enjoy weekly deals.</p>
<div>
<p>Subscribe to our newsletter!</p>
</div>
<p>Limited time offer.</p>
</body>
h2 ~ p { color: green; }
Web page title
index.html
Join us
Enjoy weekly deals.

Subscribe to our newsletter!

Limited time offer.
READY TO USE CODE
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
Sibling 

combinators
General

Adjacent
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
SIBLING COMBINATOR: ADJACENT
Select elements that are immediate siblings, not just general.
h2 + p {color: green}
Syntax selectorA + selectorB {style properties}
With this code only the paragraphs that are immediate siblings of h2 are shown in green.
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
SIBLING COMBINATOR: ADJACENT
h2
h2 + p
p
.div
p
p
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
SIBLING COMBINATOR: ADJACENT
h2 + p
+
"
h2
"
p div
!
"
p
"
p
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
SIBLING COMBINATOR: ADJACENT
<body>
<h2>Join us</h2>
<p>Subscribe to our newsletter!</p>
<p>Enjoy weekly deals.</p>
</body>
h2 + p { color: green; }
Web page title
index.html
Join us
Subscribe to our newsletter!

Enjoy weekly deals.
READY TO USE CODE
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
SIBLING COMBINATOR: ADJACENT
<body>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
</ul>
</body>
li + li { color: green; }
Web page title
index.html
• Item 1

• Item 2

• Item 3

• Item 4

• Item 5
READY TO USE CODE
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
CHILD
Combinator
SIBLING
Combinator
DESCENDANT
Combinator
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
AVOID EXTRA SELECTORS
body #container .myclass ul li {....} .someclass li {...}
Learn front-end development at rocket speed
inarocket.com
by miguelsanchez.com
YOU CAN CONTINUE THIS COURSE FOR FREE ON
+ READY TO USE CODE
+ QUIZZES
+ FREE UPDATES
We respect your time

No more blah blah videos. Just straight to
the point slides with relevant information.
Ready to use code

Real code you can just copy and paste into
your real projects.
Step by step guides

Clear and concise steps to build real use
solutions. No missed points.
Learn front-end development at rocket speed
inarocket.com
IN A ROCKET
Learn front-end development at rocket speed
CSS CSS FUNDAMENTALS
Combinators

Contenu connexe

Tendances

9 steps to Optimizing Your Website for SEO and Profits
9 steps to Optimizing Your Website for SEO and Profits9 steps to Optimizing Your Website for SEO and Profits
9 steps to Optimizing Your Website for SEO and ProfitsEscape The Matrix
 
Optimizing Your WordPress Site
Optimizing Your WordPress SiteOptimizing Your WordPress Site
Optimizing Your WordPress SitePhil Buckley
 
Site Optimization Process – Meta Keyword Tag Optimization03 meta keyword opti...
Site Optimization Process – Meta Keyword Tag Optimization03 meta keyword opti...Site Optimization Process – Meta Keyword Tag Optimization03 meta keyword opti...
Site Optimization Process – Meta Keyword Tag Optimization03 meta keyword opti...Neeraj Dhiman
 
Direct Marketing SEO
Direct Marketing SEODirect Marketing SEO
Direct Marketing SEOAlexisK
 
Lesson 4 - Search Engine Optimization
Lesson 4 - Search Engine OptimizationLesson 4 - Search Engine Optimization
Lesson 4 - Search Engine OptimizationHanna-Liisa Pender
 

Tendances (6)

SEO: A Web Design Perspective
SEO: A Web Design PerspectiveSEO: A Web Design Perspective
SEO: A Web Design Perspective
 
9 steps to Optimizing Your Website for SEO and Profits
9 steps to Optimizing Your Website for SEO and Profits9 steps to Optimizing Your Website for SEO and Profits
9 steps to Optimizing Your Website for SEO and Profits
 
Optimizing Your WordPress Site
Optimizing Your WordPress SiteOptimizing Your WordPress Site
Optimizing Your WordPress Site
 
Site Optimization Process – Meta Keyword Tag Optimization03 meta keyword opti...
Site Optimization Process – Meta Keyword Tag Optimization03 meta keyword opti...Site Optimization Process – Meta Keyword Tag Optimization03 meta keyword opti...
Site Optimization Process – Meta Keyword Tag Optimization03 meta keyword opti...
 
Direct Marketing SEO
Direct Marketing SEODirect Marketing SEO
Direct Marketing SEO
 
Lesson 4 - Search Engine Optimization
Lesson 4 - Search Engine OptimizationLesson 4 - Search Engine Optimization
Lesson 4 - Search Engine Optimization
 

Similaire à 11- Learn CSS Fundamentals / Combinators

12- Learn CSS Fundamentals / Mix & group
12- Learn CSS Fundamentals / Mix & group12- Learn CSS Fundamentals / Mix & group
12- Learn CSS Fundamentals / Mix & groupIn a Rocket
 
9- Learn CSS Fundamentals / Pseudo-classes
9- Learn CSS Fundamentals / Pseudo-classes9- Learn CSS Fundamentals / Pseudo-classes
9- Learn CSS Fundamentals / Pseudo-classesIn a Rocket
 
8- Learn CSS Fundamentals / Attribute selectors
8- Learn CSS Fundamentals / Attribute selectors8- Learn CSS Fundamentals / Attribute selectors
8- Learn CSS Fundamentals / Attribute selectorsIn a Rocket
 
14- Learn CSS Fundamentals / Inheritance
14- Learn CSS Fundamentals / Inheritance14- Learn CSS Fundamentals / Inheritance
14- Learn CSS Fundamentals / InheritanceIn a Rocket
 
10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elements10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elementsIn a Rocket
 
CSS in React - The Good, The Bad, and The Ugly
CSS in React - The Good, The Bad, and The UglyCSS in React - The Good, The Bad, and The Ugly
CSS in React - The Good, The Bad, and The UglyJoe Seifi
 
13- Learn CSS Fundamentals / Specificity
13- Learn CSS Fundamentals / Specificity13- Learn CSS Fundamentals / Specificity
13- Learn CSS Fundamentals / SpecificityIn a Rocket
 
Css for Development
Css for DevelopmentCss for Development
Css for Developmenttsengsite
 
CSS Foundations, pt 1
CSS Foundations, pt 1CSS Foundations, pt 1
CSS Foundations, pt 1Shawn Calvert
 
EnterJS 2015 - Continuous Integration for Frontend Code
EnterJS 2015 - Continuous Integration for Frontend CodeEnterJS 2015 - Continuous Integration for Frontend Code
EnterJS 2015 - Continuous Integration for Frontend CodeMarcel Birkner
 
Front End Best Practices
Front End Best PracticesFront End Best Practices
Front End Best PracticesHolger Bartel
 
Get Started With Tailwind React and Create Beautiful Apps.pdf
Get Started With Tailwind React and Create Beautiful Apps.pdfGet Started With Tailwind React and Create Beautiful Apps.pdf
Get Started With Tailwind React and Create Beautiful Apps.pdfRonDosh
 
Re-Experience SharePoint: Interface Enhancements in SharePoint 2010
Re-Experience SharePoint: Interface Enhancements in SharePoint 2010Re-Experience SharePoint: Interface Enhancements in SharePoint 2010
Re-Experience SharePoint: Interface Enhancements in SharePoint 2010Benjamin Niaulin
 
Css Founder.com | Cssfounder Org
Css Founder.com | Cssfounder OrgCss Founder.com | Cssfounder Org
Css Founder.com | Cssfounder OrgCss Founder
 
Website designing company | Cssfounder.com
Website designing company | Cssfounder.comWebsite designing company | Cssfounder.com
Website designing company | Cssfounder.comCss Founder
 
Advance Css 1194323118268797 5
Advance Css 1194323118268797 5Advance Css 1194323118268797 5
Advance Css 1194323118268797 5dharshyamal
 
Advance Css
Advance CssAdvance Css
Advance Cssvijayta
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1Heather Rock
 

Similaire à 11- Learn CSS Fundamentals / Combinators (20)

12- Learn CSS Fundamentals / Mix & group
12- Learn CSS Fundamentals / Mix & group12- Learn CSS Fundamentals / Mix & group
12- Learn CSS Fundamentals / Mix & group
 
9- Learn CSS Fundamentals / Pseudo-classes
9- Learn CSS Fundamentals / Pseudo-classes9- Learn CSS Fundamentals / Pseudo-classes
9- Learn CSS Fundamentals / Pseudo-classes
 
8- Learn CSS Fundamentals / Attribute selectors
8- Learn CSS Fundamentals / Attribute selectors8- Learn CSS Fundamentals / Attribute selectors
8- Learn CSS Fundamentals / Attribute selectors
 
14- Learn CSS Fundamentals / Inheritance
14- Learn CSS Fundamentals / Inheritance14- Learn CSS Fundamentals / Inheritance
14- Learn CSS Fundamentals / Inheritance
 
10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elements10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elements
 
CSS in React - The Good, The Bad, and The Ugly
CSS in React - The Good, The Bad, and The UglyCSS in React - The Good, The Bad, and The Ugly
CSS in React - The Good, The Bad, and The Ugly
 
13- Learn CSS Fundamentals / Specificity
13- Learn CSS Fundamentals / Specificity13- Learn CSS Fundamentals / Specificity
13- Learn CSS Fundamentals / Specificity
 
Css for Development
Css for DevelopmentCss for Development
Css for Development
 
David Weliver
David WeliverDavid Weliver
David Weliver
 
Critical Rendering Path
Critical Rendering PathCritical Rendering Path
Critical Rendering Path
 
CSS Foundations, pt 1
CSS Foundations, pt 1CSS Foundations, pt 1
CSS Foundations, pt 1
 
EnterJS 2015 - Continuous Integration for Frontend Code
EnterJS 2015 - Continuous Integration for Frontend CodeEnterJS 2015 - Continuous Integration for Frontend Code
EnterJS 2015 - Continuous Integration for Frontend Code
 
Front End Best Practices
Front End Best PracticesFront End Best Practices
Front End Best Practices
 
Get Started With Tailwind React and Create Beautiful Apps.pdf
Get Started With Tailwind React and Create Beautiful Apps.pdfGet Started With Tailwind React and Create Beautiful Apps.pdf
Get Started With Tailwind React and Create Beautiful Apps.pdf
 
Re-Experience SharePoint: Interface Enhancements in SharePoint 2010
Re-Experience SharePoint: Interface Enhancements in SharePoint 2010Re-Experience SharePoint: Interface Enhancements in SharePoint 2010
Re-Experience SharePoint: Interface Enhancements in SharePoint 2010
 
Css Founder.com | Cssfounder Org
Css Founder.com | Cssfounder OrgCss Founder.com | Cssfounder Org
Css Founder.com | Cssfounder Org
 
Website designing company | Cssfounder.com
Website designing company | Cssfounder.comWebsite designing company | Cssfounder.com
Website designing company | Cssfounder.com
 
Advance Css 1194323118268797 5
Advance Css 1194323118268797 5Advance Css 1194323118268797 5
Advance Css 1194323118268797 5
 
Advance Css
Advance CssAdvance Css
Advance Css
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1
 

Plus de In a Rocket

3- Learn Flexbox & CSS Grid / Container & items
3- Learn Flexbox & CSS Grid / Container & items3- Learn Flexbox & CSS Grid / Container & items
3- Learn Flexbox & CSS Grid / Container & itemsIn a Rocket
 
2- Learn Flexbox & CSS Grid / Context
2- Learn Flexbox & CSS Grid / Context2- Learn Flexbox & CSS Grid / Context
2- Learn Flexbox & CSS Grid / ContextIn a Rocket
 
1- Learn Flexbox & CSS Grid / Environment setup
1- Learn Flexbox & CSS Grid / Environment setup1- Learn Flexbox & CSS Grid / Environment setup
1- Learn Flexbox & CSS Grid / Environment setupIn a Rocket
 
17- Learn CSS Fundamentals / Units
17- Learn CSS Fundamentals / Units17- Learn CSS Fundamentals / Units
17- Learn CSS Fundamentals / UnitsIn a Rocket
 
16- Learn CSS Fundamentals / Background
16- Learn CSS Fundamentals / Background16- Learn CSS Fundamentals / Background
16- Learn CSS Fundamentals / BackgroundIn a Rocket
 
15- Learn CSS Fundamentals / Color
15- Learn CSS Fundamentals / Color15- Learn CSS Fundamentals / Color
15- Learn CSS Fundamentals / ColorIn a Rocket
 
2- Learn HTML Fundamentals / Text Formatting
2- Learn HTML Fundamentals / Text Formatting2- Learn HTML Fundamentals / Text Formatting
2- Learn HTML Fundamentals / Text FormattingIn a Rocket
 
1- Learn HTML Fundamentals / Start in 5 Minutes
1- Learn HTML Fundamentals / Start in 5 Minutes1- Learn HTML Fundamentals / Start in 5 Minutes
1- Learn HTML Fundamentals / Start in 5 MinutesIn a Rocket
 
Learn SUIT: CSS Naming Convention
Learn SUIT: CSS Naming ConventionLearn SUIT: CSS Naming Convention
Learn SUIT: CSS Naming ConventionIn a Rocket
 
Learn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionLearn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionIn a Rocket
 

Plus de In a Rocket (10)

3- Learn Flexbox & CSS Grid / Container & items
3- Learn Flexbox & CSS Grid / Container & items3- Learn Flexbox & CSS Grid / Container & items
3- Learn Flexbox & CSS Grid / Container & items
 
2- Learn Flexbox & CSS Grid / Context
2- Learn Flexbox & CSS Grid / Context2- Learn Flexbox & CSS Grid / Context
2- Learn Flexbox & CSS Grid / Context
 
1- Learn Flexbox & CSS Grid / Environment setup
1- Learn Flexbox & CSS Grid / Environment setup1- Learn Flexbox & CSS Grid / Environment setup
1- Learn Flexbox & CSS Grid / Environment setup
 
17- Learn CSS Fundamentals / Units
17- Learn CSS Fundamentals / Units17- Learn CSS Fundamentals / Units
17- Learn CSS Fundamentals / Units
 
16- Learn CSS Fundamentals / Background
16- Learn CSS Fundamentals / Background16- Learn CSS Fundamentals / Background
16- Learn CSS Fundamentals / Background
 
15- Learn CSS Fundamentals / Color
15- Learn CSS Fundamentals / Color15- Learn CSS Fundamentals / Color
15- Learn CSS Fundamentals / Color
 
2- Learn HTML Fundamentals / Text Formatting
2- Learn HTML Fundamentals / Text Formatting2- Learn HTML Fundamentals / Text Formatting
2- Learn HTML Fundamentals / Text Formatting
 
1- Learn HTML Fundamentals / Start in 5 Minutes
1- Learn HTML Fundamentals / Start in 5 Minutes1- Learn HTML Fundamentals / Start in 5 Minutes
1- Learn HTML Fundamentals / Start in 5 Minutes
 
Learn SUIT: CSS Naming Convention
Learn SUIT: CSS Naming ConventionLearn SUIT: CSS Naming Convention
Learn SUIT: CSS Naming Convention
 
Learn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionLearn BEM: CSS Naming Convention
Learn BEM: CSS Naming Convention
 

Dernier

Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Lucknow
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一Fs
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 

Dernier (20)

Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 

11- Learn CSS Fundamentals / Combinators

  • 1. IN A ROCKET Learn front-end development at rocket speed CSS CSS FUNDAMENTALS Combinators
  • 2. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com CHILD Combinators SIBLING Combinators DESCENDANT Combinator
  • 3. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com DESCENDANT COMBINATOR Describe an element that is the descendant of another element in the document tree. header .promo {color: green} Syntax selectorOutsite selectorInside {style properties} With this code all elements that have a class promo inside a header element are shown in green.
  • 4. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com DESCENDANT COMBINATOR header .promo .promo header .promo .div .promo
  • 5. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com HTML CSS Browser DESCENDANT COMBINATOR <body> <header> <h1 class="promo">Join us</h1> <div> <p class="promo">Subscribe to our newsletter!</p> </div> </header> <h1 class="promo">Deals</h1> <p class="promo">Enjoy a 10% discount.</p> </body> .promo { font-style: italic; } header .promo { color: green; } Web page title index.html Join us Subscribe to our newsletter! Deals Enjoy a 10% discount. READY TO USE CODE
  • 6. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com CHILD Combinator SIBLING Combinators DESCENDANT Combinators
  • 7. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com CHILD COMBINATOR Only targets immediate child elements. header > .promo {color: green} Syntax selectorOutsite > selectorInside {style properties} With this code only the immediate child elements of header that have a class promo are shown in green.
  • 8. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com CHILD COMBINATOR header .promo .promo header > .promo .div .promo > .promo >
  • 9. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com CHILD COMBINATOR header > .promo ! > > header " .promo " .promo div ! " .promo >
  • 10. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com HTML CSS Browser CHILD COMBINATOR <body> <header> <h1 class="promo">Join us</h1> <div> <p class="promo">Subscribe to our newsletter!</p> </div> </header> </body> .promo { font-style: italic; } header > .promo { color: green; } Web page title index.html Join us Subscribe to our newsletter! READY TO USE CODE
  • 11. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com CHILD Combinators SIBLING Combinator DESCENDANT Combinators
  • 12. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com Sibling 
 combinators General Adjacent
  • 13. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com SIBLING COMBINATOR: GENERAL Select elements based of sibling relationships. h2 ~ p {color: green} Syntax selectorA ~ selectorB {style properties} With this code only the paragraphs that are siblings of h2 are shown in green.
  • 14. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com SIBLING COMBINATOR: GENERAL h2 h2 ~ p p div p p
  • 15. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com SIBLING COMBINATOR: GENERAL h2 ~ p ~ " h2 " p div ! " p ~ " p ~
  • 16. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com HTML CSS Browser SIBLING COMBINATOR: GENERAL <body> <h2>Join us</h2> <p>Enjoy weekly deals.</p> <div> <p>Subscribe to our newsletter!</p> </div> <p>Limited time offer.</p> </body> h2 ~ p { color: green; } Web page title index.html Join us Enjoy weekly deals. Subscribe to our newsletter! Limited time offer. READY TO USE CODE
  • 17. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com Sibling 
 combinators General Adjacent
  • 18. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com SIBLING COMBINATOR: ADJACENT Select elements that are immediate siblings, not just general. h2 + p {color: green} Syntax selectorA + selectorB {style properties} With this code only the paragraphs that are immediate siblings of h2 are shown in green.
  • 19. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com SIBLING COMBINATOR: ADJACENT h2 h2 + p p .div p p
  • 20. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com SIBLING COMBINATOR: ADJACENT h2 + p + " h2 " p div ! " p " p
  • 21. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com HTML CSS Browser SIBLING COMBINATOR: ADJACENT <body> <h2>Join us</h2> <p>Subscribe to our newsletter!</p> <p>Enjoy weekly deals.</p> </body> h2 + p { color: green; } Web page title index.html Join us Subscribe to our newsletter! Enjoy weekly deals. READY TO USE CODE
  • 22. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com HTML CSS Browser SIBLING COMBINATOR: ADJACENT <body> <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li>Item 4</li> <li>Item 5</li> </ul> </body> li + li { color: green; } Web page title index.html • Item 1 • Item 2 • Item 3 • Item 4 • Item 5 READY TO USE CODE
  • 23. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com CHILD Combinator SIBLING Combinator DESCENDANT Combinator
  • 24. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com AVOID EXTRA SELECTORS body #container .myclass ul li {....} .someclass li {...}
  • 25. Learn front-end development at rocket speed inarocket.com by miguelsanchez.com YOU CAN CONTINUE THIS COURSE FOR FREE ON + READY TO USE CODE + QUIZZES + FREE UPDATES
  • 26. We respect your time
 No more blah blah videos. Just straight to the point slides with relevant information. Ready to use code
 Real code you can just copy and paste into your real projects. Step by step guides
 Clear and concise steps to build real use solutions. No missed points. Learn front-end development at rocket speed inarocket.com
  • 27. IN A ROCKET Learn front-end development at rocket speed CSS CSS FUNDAMENTALS Combinators