SlideShare una empresa de Scribd logo
1 de 34
Descargar para leer sin conexión
CSS3


http://tinyurl.com/wsf-css3
CSS3 ?
On attend depuis longtemps…


• Commencé en 1999
• Modulaire
• … CSS 2.1 n’est toujours pas terminé
Marre d’attendre ?
      Commençons !
•   Sélecteurs
•   Media Queries
•   Multi-column
•   Backgrounds
•   Borders
•   Box-shadow
•   Colors
•   Text
•   Transformations
•   Transformations + Transitions
•   Animations
Sélecteurs CSS 2.1
• * — Tous les éléments
  * { border: 0; }


• E — Éléments de type E
  p { line-height: 1.5; }


• E F — Éléments F descendants de E
  div a { text-decoration: underline; }


• E > F — Éléments F enfants de E
  div > ul { background: green; }
Sélecteurs CSS 2.1
• E + F — Éléments F directement précédé de E
  section h1 { margin: 1em; }


• E:lang(c) — Éléments E ayant la langue c
  span:lang(en) { font-style: italic; }


• E[foo] — Éléments E ayant l’attribut foo
  a[title] { border: 1px dotted #000; }
Sélecteurs CSS 2.1
• E :first-child — Premier élément de E
  div :first-child { margin: 0; }


• E:link, E:visited — Éléments E dont l’ancre
  n’a pas été visitée / a été visitée
  a:link    { color: blue; }
  a:visited { color: green; }


• E:active, E:hover, E:focus — Éléments E
  pendant des actions utilisateur
  a:active { background-color: yellow; }
Sélecteurs CSS 2.1
• E[foo="bar"] — Éléments E dont l’attribut foo
  vaut exactement bar
  a[href="#top"] { color: pink; }


• E[foo~="bar"] — Éléments E dont l’attribut foo
  contient bar
  div[class~="warning"] { background-color: yellow; }


• E[foo|="bar"] — Éléments E dont l’attribut foo
  commence par bar. Incluant le tiret.
  a[hreflang|="en"] { font-style: italic; }

  Fonctionne pour <a hreflang="en"> et <a hreflang="en-US">
Sélecteurs CSS 2.1

• .foo, E.foo — Éléments ou éléments E dont
  l’attribut class vaut foo
  .warning, div.warning { color: red; }


• #foo, E#foo — Éléments ou éléments E dont
  l’attribut id vaut foo
  #note, div#note { color: blue; }
Sélecteurs CSS3
• E ~ F — Éléments F précédé d’un élément E
  figure ~ figcaption { font-size: 80%; }


• E :not(s) — Éléments excluant le sélecteur s
  div *:not(p) { margin: 0; }


• E:root — Premier élément du document
  div:root { font-size: 100%; }
Sélecteurs CSS3
• E :last-child — Dernier enfant de E
  ul:last-child { margin-bottom: 1em; }


• E:empty — Éléments E vides
  div:empty { display: none; }


• E:target — Élément E cible de l’ancre en cours
  h1:target { text-decoration: underline; }
Sélecteurs CSS3
• E :nth-child(n) — Le      n ième   enfant de E
    div :nth-child(3) { background: red; }
    div :nth-child(3n+1) { background: red; }


• E :nth-last-child(n) — Idem, en comptant de la fin
    div :nth-last-child(3) { background: red; }


•   E:nth-of-type(n) — Le nième élément de type E
    div img:nth-of-type(3) { background: green; }


• E:nth-last-of-type(n) — Idem, en comptant de la fin
    div img:nth-last-of-type(3) { background: green; }
Sélecteurs CSS3
• E :only-child — Le seul enfant de E
  div :only-child { background: blue; }


• E:first-of-type — Le premier élément de type E
  div img:first-of-type { background: red; }


• E:last-of-type — Le dernier élément de type E
  div img:last-of-type { background: green; }


• E:only-of-type — Le seul élément de type E
  div p:only-of-type { background: yellow; }
Sélecteurs CSS3
• E[foo^="bar"] — Éléments E ayant l’attribut foo qui
  commence par bar
  a[class^="number-"] { padding: 0; }


• E[foo$="bar"] — Éléments E ayant l’attribut foo qui
  se termine par bar
  a[class$="ing"] { padding: 1em; }


• E[foo*="bar"] — Éléments E ayant l’attribut foo qui
  contient bar
  a[class*="ost"] { padding: .5em; }
Sélecteurs CSS3

• E:enabled, E:disabled — Éléments E activés /
  désactivés
  input:enabled   { background: #FFF; }
  input:disabled { background: grey; }


• E:checked — Éléments E cochés
  input[type="checkbox"]:checked { background: green; }
Media Queries
<link rel="stylesheet" type="text/css" media="screen" href="css/global.css">



                         •   all
                         •   braille, embossed
                         •   handheld
                         •   print
                         •   projection
                         •   screen
                         •   speech
                         •   tty
                         •   tv
Media Queries
+•   width, height, device-width, device-height
 • orientation
 • aspect-ratio, device-aspect-ratio
 • color, color-index, monochrome
 • resolution
 • (scan, grid)
Media Queries
+     only, not, and

               <link rel="stylesheet" type="text/css"
 media="screen and (min-width: 400px) and (max-width: 700px)"
                       href="css/global.css">




@media screen and (min-width: 400px) and (max-width: 700px) {
	 body {…}
}
Multi-column


p{
	

 column-width: 13em;
	

 column-gap: 1em;
}
Backgrounds
 background-origin




  background-size
Backgrounds
           multiple backgrounds




div {
	 background:
	 	 url(body-top.gif) top left no-repeat,
	 	 url(banner_fresco.jpg) 11px 11px no-repeat,
	 	 url(body-bottom.gif) bottom left no-repeat,
	 	 url(body-middle.gif) left repeat-y;
}
Backgrounds
                          Gradients



background: -moz-linear-gradient(left, #2E2E2E, #454545 10px);
background: -webkit-gradient(linear, 0 0, 10 0, from(#2E2E2E), to
(#454545));
background: linear-gradient(left, #2E2E2E, #454545 10px);
Backgrounds
                          Gradients




background: -moz-linear-gradient(left, #2E2E2E, #454545 10px);
background: -webkit-linear-gradient(left, #2E2E2E, #454545 10px);
background: linear-gradient(left, #2E2E2E, #454545 10px);
Backgrounds
                            Gradients



background:   url(fallback.png);
background:   -moz-linear-gradient(left, #2E2E2E, #454545 10px);
background:   -webkit-linear-gradient(left, #2E2E2E, #454545 10px);
background:   linear-gradient(left, #2E2E2E, #454545 10px);
Borders
border-image




border-radius
Box-shadow



div {
	 box-shadow: -10px -10px 0 0 #000;
}
Colors

• Opacity
• RGBA
• HSL, HSLA
Text
Web fonts (@font-face)




     text-shadow
Transformations

-moz-transform: rotate(-4deg);
-o-transform: rotate(-4deg);
-webkit-transform: rotate(-4deg);
transform: rotate(-4deg);
Transformations + Transitions
Animations
Et encore plein d’autres choses !
Ressources


•   CSS3 Previews http://www.css3.info/preview/

•   CSS3 Module Status http://www.css3.info/modules/

•   CSS3 Selectors Test http://tools.css3.info/selectors-test/
Ressources (démos)
•   Super awesome buttons with CSS3 http://www.zurb.com/
    blog_uploads/0000/0617/buttons-03.html

•   An image gallery showcase for CSS transitions http://
    devfiles.myopera.com/articles/1041/image-gallery.html

•   Pure CSS Coke Can http://www.romancortes.com/blog/pure-css-
    coke-can/

•   CSS 3D Meninas http://www.romancortes.com/blog/css-3d-meninas/

•   Sliding Vinyl with CSS3 http://www.zurb.com/playground/sliding-vinyl

•   47 amazing CSS3 animation demos http://
    www.webdesignerwall.com/trends/47-amazing-css3-animation-
    demos/
Contact


 Nicolas Le Gall
me@neovov.com

Más contenido relacionado

Destacado

Comparison table jan lokpal bill govt lokpal bill and ncpri drafts
Comparison table  jan lokpal bill govt lokpal bill and ncpri draftsComparison table  jan lokpal bill govt lokpal bill and ncpri drafts
Comparison table jan lokpal bill govt lokpal bill and ncpri draftsDEEPAK YADAV
 
The future of hands on learning technologies-no pictures
The future of hands on learning technologies-no picturesThe future of hands on learning technologies-no pictures
The future of hands on learning technologies-no picturesSusanna Martin
 
Opportunity Flipchart Screen Res
Opportunity Flipchart Screen ResOpportunity Flipchart Screen Res
Opportunity Flipchart Screen ResRalfWiebeck
 
Big history
Big historyBig history
Big historyjrizo87
 
Linked Data Techniques for MOF compliant Models
Linked Data Techniques for MOF compliant ModelsLinked Data Techniques for MOF compliant Models
Linked Data Techniques for MOF compliant ModelsGerd Groener
 
Aitiidiikiiwan priid.impress
Aitiidiikiiwan priid.impressAitiidiikiiwan priid.impress
Aitiidiikiiwan priid.impressfred17
 
Aitiidiikiiwan priid.impress
Aitiidiikiiwan priid.impressAitiidiikiiwan priid.impress
Aitiidiikiiwan priid.impressfred17
 
ฉันเหมือนใคร
ฉันเหมือนใครฉันเหมือนใคร
ฉันเหมือนใครphaiza
 
介绍Dbms registry plsql程序包1
介绍Dbms registry plsql程序包1介绍Dbms registry plsql程序包1
介绍Dbms registry plsql程序包1maclean liu
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_pptmaclean liu
 
Puntuaciones provisionales (miércoles 26 a las 16h)
Puntuaciones provisionales (miércoles 26 a las 16h)Puntuaciones provisionales (miércoles 26 a las 16h)
Puntuaciones provisionales (miércoles 26 a las 16h)Emi Voces
 

Destacado (17)

Comparison table jan lokpal bill govt lokpal bill and ncpri drafts
Comparison table  jan lokpal bill govt lokpal bill and ncpri draftsComparison table  jan lokpal bill govt lokpal bill and ncpri drafts
Comparison table jan lokpal bill govt lokpal bill and ncpri drafts
 
The future of hands on learning technologies-no pictures
The future of hands on learning technologies-no picturesThe future of hands on learning technologies-no pictures
The future of hands on learning technologies-no pictures
 
Autodigest feb march
Autodigest feb marchAutodigest feb march
Autodigest feb march
 
Ais life 2010-2
Ais life 2010-2Ais life 2010-2
Ais life 2010-2
 
Opportunity Flipchart Screen Res
Opportunity Flipchart Screen ResOpportunity Flipchart Screen Res
Opportunity Flipchart Screen Res
 
Big history
Big historyBig history
Big history
 
Linked Data Techniques for MOF compliant Models
Linked Data Techniques for MOF compliant ModelsLinked Data Techniques for MOF compliant Models
Linked Data Techniques for MOF compliant Models
 
Aitiidiikiiwan priid.impress
Aitiidiikiiwan priid.impressAitiidiikiiwan priid.impress
Aitiidiikiiwan priid.impress
 
123
123123
123
 
Solaria training dessent
Solaria training dessentSolaria training dessent
Solaria training dessent
 
Aitiidiikiiwan priid.impress
Aitiidiikiiwan priid.impressAitiidiikiiwan priid.impress
Aitiidiikiiwan priid.impress
 
ฉันเหมือนใคร
ฉันเหมือนใครฉันเหมือนใคร
ฉันเหมือนใคร
 
介绍Dbms registry plsql程序包1
介绍Dbms registry plsql程序包1介绍Dbms registry plsql程序包1
介绍Dbms registry plsql程序包1
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_ppt
 
Oporrak
OporrakOporrak
Oporrak
 
Puntuaciones provisionales (miércoles 26 a las 16h)
Puntuaciones provisionales (miércoles 26 a las 16h)Puntuaciones provisionales (miércoles 26 a las 16h)
Puntuaciones provisionales (miércoles 26 a las 16h)
 
Meditation
MeditationMeditation
Meditation
 

Similar a CSS3

Intégrateurs, bousculez vos habitudes
Intégrateurs, bousculez vos habitudesIntégrateurs, bousculez vos habitudes
Intégrateurs, bousculez vos habitudesRaphaël Goetter
 
CSS Facile : organiser ses feuilles de style
CSS Facile : organiser ses feuilles de styleCSS Facile : organiser ses feuilles de style
CSS Facile : organiser ses feuilles de styleKaelig Deloumeau-Prigent
 
Chapitre 2 - Programmation web - 3) Le CSS.pdf
Chapitre 2 - Programmation web - 3) Le CSS.pdfChapitre 2 - Programmation web - 3) Le CSS.pdf
Chapitre 2 - Programmation web - 3) Le CSS.pdfAnouAr42
 
technologie web - part2
technologie web - part2technologie web - part2
technologie web - part2Benoît Simard
 
Internationalisation du Front
Internationalisation du FrontInternationalisation du Front
Internationalisation du FrontYannick Croissant
 
Gagnez en productivité grâce aux préprocesseurs css
Gagnez en productivité grâce aux préprocesseurs cssGagnez en productivité grâce aux préprocesseurs css
Gagnez en productivité grâce aux préprocesseurs csspefringant
 
Cours css niveau debutant
Cours css niveau debutantCours css niveau debutant
Cours css niveau debutantTheBest Icanbe
 
LESS : moins de CSS, plus de fun ! (KiwiParty 2011)
LESS : moins de CSS, plus de fun ! (KiwiParty 2011)LESS : moins de CSS, plus de fun ! (KiwiParty 2011)
LESS : moins de CSS, plus de fun ! (KiwiParty 2011)Corinne Schillinger
 
OpenCode beta : Haml & Sass
OpenCode beta : Haml & SassOpenCode beta : Haml & Sass
OpenCode beta : Haml & SassRémi Prévost
 
Soyez revolutionnaire, utilisez CSS2 !
Soyez revolutionnaire, utilisez CSS2 !Soyez revolutionnaire, utilisez CSS2 !
Soyez revolutionnaire, utilisez CSS2 !Raphaël Goetter
 
Enib cours c.a.i. web - séance #1 - html5 css3-js - 2
Enib   cours c.a.i. web - séance #1 - html5 css3-js - 2Enib   cours c.a.i. web - séance #1 - html5 css3-js - 2
Enib cours c.a.i. web - séance #1 - html5 css3-js - 2Horacio Gonzalez
 
W3 cafe ie10etwindows8
W3 cafe ie10etwindows8W3 cafe ie10etwindows8
W3 cafe ie10etwindows8davrous
 
CSS3 Intel Webinar
CSS3 Intel WebinarCSS3 Intel Webinar
CSS3 Intel WebinarViniSketch
 
Trois avancées majeures en CSS3 : Mediaqueries, Grid Layout et Animations (MS...
Trois avancées majeures en CSS3 : Mediaqueries, Grid Layout et Animations (MS...Trois avancées majeures en CSS3 : Mediaqueries, Grid Layout et Animations (MS...
Trois avancées majeures en CSS3 : Mediaqueries, Grid Layout et Animations (MS...Raphaël Goetter
 
Trois avancées majeures en CSS3 : Media Queries, Grid Layout et Animations
Trois avancées majeures en CSS3 : Media Queries, Grid Layout et AnimationsTrois avancées majeures en CSS3 : Media Queries, Grid Layout et Animations
Trois avancées majeures en CSS3 : Media Queries, Grid Layout et AnimationsMicrosoft
 
Devoxx France 2013: CSS, more or Less - http://www.devoxx.com/display/FR13/CS...
Devoxx France 2013: CSS, more or Less - http://www.devoxx.com/display/FR13/CS...Devoxx France 2013: CSS, more or Less - http://www.devoxx.com/display/FR13/CS...
Devoxx France 2013: CSS, more or Less - http://www.devoxx.com/display/FR13/CS...VISEO
 
Intégration web MMI
Intégration web MMIIntégration web MMI
Intégration web MMIPierre VERT
 

Similar a CSS3 (20)

Intégrateurs, bousculez vos habitudes
Intégrateurs, bousculez vos habitudesIntégrateurs, bousculez vos habitudes
Intégrateurs, bousculez vos habitudes
 
CSS Facile : organiser ses feuilles de style
CSS Facile : organiser ses feuilles de styleCSS Facile : organiser ses feuilles de style
CSS Facile : organiser ses feuilles de style
 
Chapitre 2 - Programmation web - 3) Le CSS.pdf
Chapitre 2 - Programmation web - 3) Le CSS.pdfChapitre 2 - Programmation web - 3) Le CSS.pdf
Chapitre 2 - Programmation web - 3) Le CSS.pdf
 
technologie web - part2
technologie web - part2technologie web - part2
technologie web - part2
 
Internationalisation du Front
Internationalisation du FrontInternationalisation du Front
Internationalisation du Front
 
Gagnez en productivité grâce aux préprocesseurs css
Gagnez en productivité grâce aux préprocesseurs cssGagnez en productivité grâce aux préprocesseurs css
Gagnez en productivité grâce aux préprocesseurs css
 
HTML5
HTML5HTML5
HTML5
 
Cours css niveau debutant
Cours css niveau debutantCours css niveau debutant
Cours css niveau debutant
 
LESS : moins de CSS, plus de fun ! (KiwiParty 2011)
LESS : moins de CSS, plus de fun ! (KiwiParty 2011)LESS : moins de CSS, plus de fun ! (KiwiParty 2011)
LESS : moins de CSS, plus de fun ! (KiwiParty 2011)
 
OpenCode beta : Haml & Sass
OpenCode beta : Haml & SassOpenCode beta : Haml & Sass
OpenCode beta : Haml & Sass
 
Soyez revolutionnaire, utilisez CSS2 !
Soyez revolutionnaire, utilisez CSS2 !Soyez revolutionnaire, utilisez CSS2 !
Soyez revolutionnaire, utilisez CSS2 !
 
Enib cours c.a.i. web - séance #1 - html5 css3-js - 2
Enib   cours c.a.i. web - séance #1 - html5 css3-js - 2Enib   cours c.a.i. web - séance #1 - html5 css3-js - 2
Enib cours c.a.i. web - séance #1 - html5 css3-js - 2
 
Une Introduction à R
Une Introduction à RUne Introduction à R
Une Introduction à R
 
Html
HtmlHtml
Html
 
W3 cafe ie10etwindows8
W3 cafe ie10etwindows8W3 cafe ie10etwindows8
W3 cafe ie10etwindows8
 
CSS3 Intel Webinar
CSS3 Intel WebinarCSS3 Intel Webinar
CSS3 Intel Webinar
 
Trois avancées majeures en CSS3 : Mediaqueries, Grid Layout et Animations (MS...
Trois avancées majeures en CSS3 : Mediaqueries, Grid Layout et Animations (MS...Trois avancées majeures en CSS3 : Mediaqueries, Grid Layout et Animations (MS...
Trois avancées majeures en CSS3 : Mediaqueries, Grid Layout et Animations (MS...
 
Trois avancées majeures en CSS3 : Media Queries, Grid Layout et Animations
Trois avancées majeures en CSS3 : Media Queries, Grid Layout et AnimationsTrois avancées majeures en CSS3 : Media Queries, Grid Layout et Animations
Trois avancées majeures en CSS3 : Media Queries, Grid Layout et Animations
 
Devoxx France 2013: CSS, more or Less - http://www.devoxx.com/display/FR13/CS...
Devoxx France 2013: CSS, more or Less - http://www.devoxx.com/display/FR13/CS...Devoxx France 2013: CSS, more or Less - http://www.devoxx.com/display/FR13/CS...
Devoxx France 2013: CSS, more or Less - http://www.devoxx.com/display/FR13/CS...
 
Intégration web MMI
Intégration web MMIIntégration web MMI
Intégration web MMI
 

Último

Chana Orloff.pptx Sculptrice franco-ukranienne
Chana Orloff.pptx Sculptrice franco-ukranienneChana Orloff.pptx Sculptrice franco-ukranienne
Chana Orloff.pptx Sculptrice franco-ukranienneTxaruka
 
Pas de vagues. pptx Film français
Pas de vagues.  pptx   Film     françaisPas de vagues.  pptx   Film     français
Pas de vagues. pptx Film françaisTxaruka
 
PIE-A2-P4-support stagiaires sept 22-validé.pdf
PIE-A2-P4-support stagiaires sept 22-validé.pdfPIE-A2-P4-support stagiaires sept 22-validé.pdf
PIE-A2-P4-support stagiaires sept 22-validé.pdfRiDaHAziz
 
Bibdoc 2024 - Sobriete numerique en bibliotheque et centre de documentation.pdf
Bibdoc 2024 - Sobriete numerique en bibliotheque et centre de documentation.pdfBibdoc 2024 - Sobriete numerique en bibliotheque et centre de documentation.pdf
Bibdoc 2024 - Sobriete numerique en bibliotheque et centre de documentation.pdfBibdoc 37
 
Bibdoc 2024 - Les intelligences artificielles en bibliotheque.pdf
Bibdoc 2024 - Les intelligences artificielles en bibliotheque.pdfBibdoc 2024 - Les intelligences artificielles en bibliotheque.pdf
Bibdoc 2024 - Les intelligences artificielles en bibliotheque.pdfBibdoc 37
 
DIGNITAS INFINITA - DIGNITÉ HUMAINE; déclaration du dicastère .pptx
DIGNITAS INFINITA - DIGNITÉ HUMAINE; déclaration du dicastère .pptxDIGNITAS INFINITA - DIGNITÉ HUMAINE; déclaration du dicastère .pptx
DIGNITAS INFINITA - DIGNITÉ HUMAINE; déclaration du dicastère .pptxMartin M Flynn
 
Présentation - Initiatives - CECOSDA - OIF - Fact Checking.pptx
Présentation - Initiatives - CECOSDA - OIF - Fact Checking.pptxPrésentation - Initiatives - CECOSDA - OIF - Fact Checking.pptx
Présentation - Initiatives - CECOSDA - OIF - Fact Checking.pptxJCAC
 
Bernard Réquichot.pptx Peintre français
Bernard Réquichot.pptx   Peintre françaisBernard Réquichot.pptx   Peintre français
Bernard Réquichot.pptx Peintre françaisTxaruka
 
PIE-A2-P 5- Supports stagiaires.pptx.pdf
PIE-A2-P 5- Supports stagiaires.pptx.pdfPIE-A2-P 5- Supports stagiaires.pptx.pdf
PIE-A2-P 5- Supports stagiaires.pptx.pdfRiDaHAziz
 
La Base unique départementale - Quel bilan, au bout de 5 ans .pdf
La Base unique départementale - Quel bilan, au bout de 5 ans .pdfLa Base unique départementale - Quel bilan, au bout de 5 ans .pdf
La Base unique départementale - Quel bilan, au bout de 5 ans .pdfbdp12
 
Bibdoc 2024 - L’Éducation aux Médias et à l’Information face à l’intelligence...
Bibdoc 2024 - L’Éducation aux Médias et à l’Information face à l’intelligence...Bibdoc 2024 - L’Éducation aux Médias et à l’Information face à l’intelligence...
Bibdoc 2024 - L’Éducation aux Médias et à l’Information face à l’intelligence...Bibdoc 37
 
Vulnérabilité numérique d’usage : un enjeu pour l’aide à la réussitepdf
Vulnérabilité numérique d’usage : un enjeu pour l’aide à la réussitepdfVulnérabilité numérique d’usage : un enjeu pour l’aide à la réussitepdf
Vulnérabilité numérique d’usage : un enjeu pour l’aide à la réussitepdfSylvianeBachy
 
Bibdoc 2024 - Les maillons de la chaine du livre face aux enjeux écologiques.pdf
Bibdoc 2024 - Les maillons de la chaine du livre face aux enjeux écologiques.pdfBibdoc 2024 - Les maillons de la chaine du livre face aux enjeux écologiques.pdf
Bibdoc 2024 - Les maillons de la chaine du livre face aux enjeux écologiques.pdfBibdoc 37
 
Faut-il avoir peur de la technique ? (G. Gay-Para)
Faut-il avoir peur de la technique ? (G. Gay-Para)Faut-il avoir peur de la technique ? (G. Gay-Para)
Faut-il avoir peur de la technique ? (G. Gay-Para)Gabriel Gay-Para
 
Pas de vagues. pptx Film français
Pas de vagues.  pptx      Film   françaisPas de vagues.  pptx      Film   français
Pas de vagues. pptx Film françaisTxaruka
 
Apprendre avec des top et nano influenceurs
Apprendre avec des top et nano influenceursApprendre avec des top et nano influenceurs
Apprendre avec des top et nano influenceursStagiaireLearningmat
 
Newsletter SPW Agriculture en province du Luxembourg du 10-04-24
Newsletter SPW Agriculture en province du Luxembourg du 10-04-24Newsletter SPW Agriculture en province du Luxembourg du 10-04-24
Newsletter SPW Agriculture en province du Luxembourg du 10-04-24BenotGeorges3
 

Último (18)

Chana Orloff.pptx Sculptrice franco-ukranienne
Chana Orloff.pptx Sculptrice franco-ukranienneChana Orloff.pptx Sculptrice franco-ukranienne
Chana Orloff.pptx Sculptrice franco-ukranienne
 
Pas de vagues. pptx Film français
Pas de vagues.  pptx   Film     françaisPas de vagues.  pptx   Film     français
Pas de vagues. pptx Film français
 
PIE-A2-P4-support stagiaires sept 22-validé.pdf
PIE-A2-P4-support stagiaires sept 22-validé.pdfPIE-A2-P4-support stagiaires sept 22-validé.pdf
PIE-A2-P4-support stagiaires sept 22-validé.pdf
 
Bibdoc 2024 - Sobriete numerique en bibliotheque et centre de documentation.pdf
Bibdoc 2024 - Sobriete numerique en bibliotheque et centre de documentation.pdfBibdoc 2024 - Sobriete numerique en bibliotheque et centre de documentation.pdf
Bibdoc 2024 - Sobriete numerique en bibliotheque et centre de documentation.pdf
 
Bibdoc 2024 - Les intelligences artificielles en bibliotheque.pdf
Bibdoc 2024 - Les intelligences artificielles en bibliotheque.pdfBibdoc 2024 - Les intelligences artificielles en bibliotheque.pdf
Bibdoc 2024 - Les intelligences artificielles en bibliotheque.pdf
 
DIGNITAS INFINITA - DIGNITÉ HUMAINE; déclaration du dicastère .pptx
DIGNITAS INFINITA - DIGNITÉ HUMAINE; déclaration du dicastère .pptxDIGNITAS INFINITA - DIGNITÉ HUMAINE; déclaration du dicastère .pptx
DIGNITAS INFINITA - DIGNITÉ HUMAINE; déclaration du dicastère .pptx
 
Présentation - Initiatives - CECOSDA - OIF - Fact Checking.pptx
Présentation - Initiatives - CECOSDA - OIF - Fact Checking.pptxPrésentation - Initiatives - CECOSDA - OIF - Fact Checking.pptx
Présentation - Initiatives - CECOSDA - OIF - Fact Checking.pptx
 
Bernard Réquichot.pptx Peintre français
Bernard Réquichot.pptx   Peintre françaisBernard Réquichot.pptx   Peintre français
Bernard Réquichot.pptx Peintre français
 
PIE-A2-P 5- Supports stagiaires.pptx.pdf
PIE-A2-P 5- Supports stagiaires.pptx.pdfPIE-A2-P 5- Supports stagiaires.pptx.pdf
PIE-A2-P 5- Supports stagiaires.pptx.pdf
 
La Base unique départementale - Quel bilan, au bout de 5 ans .pdf
La Base unique départementale - Quel bilan, au bout de 5 ans .pdfLa Base unique départementale - Quel bilan, au bout de 5 ans .pdf
La Base unique départementale - Quel bilan, au bout de 5 ans .pdf
 
Bibdoc 2024 - L’Éducation aux Médias et à l’Information face à l’intelligence...
Bibdoc 2024 - L’Éducation aux Médias et à l’Information face à l’intelligence...Bibdoc 2024 - L’Éducation aux Médias et à l’Information face à l’intelligence...
Bibdoc 2024 - L’Éducation aux Médias et à l’Information face à l’intelligence...
 
Vulnérabilité numérique d’usage : un enjeu pour l’aide à la réussitepdf
Vulnérabilité numérique d’usage : un enjeu pour l’aide à la réussitepdfVulnérabilité numérique d’usage : un enjeu pour l’aide à la réussitepdf
Vulnérabilité numérique d’usage : un enjeu pour l’aide à la réussitepdf
 
Bibdoc 2024 - Les maillons de la chaine du livre face aux enjeux écologiques.pdf
Bibdoc 2024 - Les maillons de la chaine du livre face aux enjeux écologiques.pdfBibdoc 2024 - Les maillons de la chaine du livre face aux enjeux écologiques.pdf
Bibdoc 2024 - Les maillons de la chaine du livre face aux enjeux écologiques.pdf
 
Faut-il avoir peur de la technique ? (G. Gay-Para)
Faut-il avoir peur de la technique ? (G. Gay-Para)Faut-il avoir peur de la technique ? (G. Gay-Para)
Faut-il avoir peur de la technique ? (G. Gay-Para)
 
Bulletin des bibliotheques Burkina Faso mars 2024
Bulletin des bibliotheques Burkina Faso mars 2024Bulletin des bibliotheques Burkina Faso mars 2024
Bulletin des bibliotheques Burkina Faso mars 2024
 
Pas de vagues. pptx Film français
Pas de vagues.  pptx      Film   françaisPas de vagues.  pptx      Film   français
Pas de vagues. pptx Film français
 
Apprendre avec des top et nano influenceurs
Apprendre avec des top et nano influenceursApprendre avec des top et nano influenceurs
Apprendre avec des top et nano influenceurs
 
Newsletter SPW Agriculture en province du Luxembourg du 10-04-24
Newsletter SPW Agriculture en province du Luxembourg du 10-04-24Newsletter SPW Agriculture en province du Luxembourg du 10-04-24
Newsletter SPW Agriculture en province du Luxembourg du 10-04-24
 

CSS3

  • 2. CSS3 ? On attend depuis longtemps… • Commencé en 1999 • Modulaire • … CSS 2.1 n’est toujours pas terminé
  • 3. Marre d’attendre ? Commençons ! • Sélecteurs • Media Queries • Multi-column • Backgrounds • Borders • Box-shadow • Colors • Text • Transformations • Transformations + Transitions • Animations
  • 4. Sélecteurs CSS 2.1 • * — Tous les éléments * { border: 0; } • E — Éléments de type E p { line-height: 1.5; } • E F — Éléments F descendants de E div a { text-decoration: underline; } • E > F — Éléments F enfants de E div > ul { background: green; }
  • 5. Sélecteurs CSS 2.1 • E + F — Éléments F directement précédé de E section h1 { margin: 1em; } • E:lang(c) — Éléments E ayant la langue c span:lang(en) { font-style: italic; } • E[foo] — Éléments E ayant l’attribut foo a[title] { border: 1px dotted #000; }
  • 6. Sélecteurs CSS 2.1 • E :first-child — Premier élément de E div :first-child { margin: 0; } • E:link, E:visited — Éléments E dont l’ancre n’a pas été visitée / a été visitée a:link { color: blue; } a:visited { color: green; } • E:active, E:hover, E:focus — Éléments E pendant des actions utilisateur a:active { background-color: yellow; }
  • 7. Sélecteurs CSS 2.1 • E[foo="bar"] — Éléments E dont l’attribut foo vaut exactement bar a[href="#top"] { color: pink; } • E[foo~="bar"] — Éléments E dont l’attribut foo contient bar div[class~="warning"] { background-color: yellow; } • E[foo|="bar"] — Éléments E dont l’attribut foo commence par bar. Incluant le tiret. a[hreflang|="en"] { font-style: italic; } Fonctionne pour <a hreflang="en"> et <a hreflang="en-US">
  • 8. Sélecteurs CSS 2.1 • .foo, E.foo — Éléments ou éléments E dont l’attribut class vaut foo .warning, div.warning { color: red; } • #foo, E#foo — Éléments ou éléments E dont l’attribut id vaut foo #note, div#note { color: blue; }
  • 9. Sélecteurs CSS3 • E ~ F — Éléments F précédé d’un élément E figure ~ figcaption { font-size: 80%; } • E :not(s) — Éléments excluant le sélecteur s div *:not(p) { margin: 0; } • E:root — Premier élément du document div:root { font-size: 100%; }
  • 10. Sélecteurs CSS3 • E :last-child — Dernier enfant de E ul:last-child { margin-bottom: 1em; } • E:empty — Éléments E vides div:empty { display: none; } • E:target — Élément E cible de l’ancre en cours h1:target { text-decoration: underline; }
  • 11. Sélecteurs CSS3 • E :nth-child(n) — Le n ième enfant de E div :nth-child(3) { background: red; } div :nth-child(3n+1) { background: red; } • E :nth-last-child(n) — Idem, en comptant de la fin div :nth-last-child(3) { background: red; } • E:nth-of-type(n) — Le nième élément de type E div img:nth-of-type(3) { background: green; } • E:nth-last-of-type(n) — Idem, en comptant de la fin div img:nth-last-of-type(3) { background: green; }
  • 12. Sélecteurs CSS3 • E :only-child — Le seul enfant de E div :only-child { background: blue; } • E:first-of-type — Le premier élément de type E div img:first-of-type { background: red; } • E:last-of-type — Le dernier élément de type E div img:last-of-type { background: green; } • E:only-of-type — Le seul élément de type E div p:only-of-type { background: yellow; }
  • 13. Sélecteurs CSS3 • E[foo^="bar"] — Éléments E ayant l’attribut foo qui commence par bar a[class^="number-"] { padding: 0; } • E[foo$="bar"] — Éléments E ayant l’attribut foo qui se termine par bar a[class$="ing"] { padding: 1em; } • E[foo*="bar"] — Éléments E ayant l’attribut foo qui contient bar a[class*="ost"] { padding: .5em; }
  • 14. Sélecteurs CSS3 • E:enabled, E:disabled — Éléments E activés / désactivés input:enabled { background: #FFF; } input:disabled { background: grey; } • E:checked — Éléments E cochés input[type="checkbox"]:checked { background: green; }
  • 15. Media Queries <link rel="stylesheet" type="text/css" media="screen" href="css/global.css"> • all • braille, embossed • handheld • print • projection • screen • speech • tty • tv
  • 16. Media Queries +• width, height, device-width, device-height • orientation • aspect-ratio, device-aspect-ratio • color, color-index, monochrome • resolution • (scan, grid)
  • 17. Media Queries + only, not, and <link rel="stylesheet" type="text/css" media="screen and (min-width: 400px) and (max-width: 700px)" href="css/global.css"> @media screen and (min-width: 400px) and (max-width: 700px) { body {…} }
  • 19. Backgrounds background-origin background-size
  • 20. Backgrounds multiple backgrounds div { background: url(body-top.gif) top left no-repeat, url(banner_fresco.jpg) 11px 11px no-repeat, url(body-bottom.gif) bottom left no-repeat, url(body-middle.gif) left repeat-y; }
  • 21. Backgrounds Gradients background: -moz-linear-gradient(left, #2E2E2E, #454545 10px); background: -webkit-gradient(linear, 0 0, 10 0, from(#2E2E2E), to (#454545)); background: linear-gradient(left, #2E2E2E, #454545 10px);
  • 22. Backgrounds Gradients background: -moz-linear-gradient(left, #2E2E2E, #454545 10px); background: -webkit-linear-gradient(left, #2E2E2E, #454545 10px); background: linear-gradient(left, #2E2E2E, #454545 10px);
  • 23. Backgrounds Gradients background: url(fallback.png); background: -moz-linear-gradient(left, #2E2E2E, #454545 10px); background: -webkit-linear-gradient(left, #2E2E2E, #454545 10px); background: linear-gradient(left, #2E2E2E, #454545 10px);
  • 25. Box-shadow div { box-shadow: -10px -10px 0 0 #000; }
  • 31. Et encore plein d’autres choses !
  • 32. Ressources • CSS3 Previews http://www.css3.info/preview/ • CSS3 Module Status http://www.css3.info/modules/ • CSS3 Selectors Test http://tools.css3.info/selectors-test/
  • 33. Ressources (démos) • Super awesome buttons with CSS3 http://www.zurb.com/ blog_uploads/0000/0617/buttons-03.html • An image gallery showcase for CSS transitions http:// devfiles.myopera.com/articles/1041/image-gallery.html • Pure CSS Coke Can http://www.romancortes.com/blog/pure-css- coke-can/ • CSS 3D Meninas http://www.romancortes.com/blog/css-3d-meninas/ • Sliding Vinyl with CSS3 http://www.zurb.com/playground/sliding-vinyl • 47 amazing CSS3 animation demos http:// www.webdesignerwall.com/trends/47-amazing-css3-animation- demos/
  • 34. Contact Nicolas Le Gall me@neovov.com