SlideShare une entreprise Scribd logo
1  sur  64
THECSS3 OF
TOMORROW

         peter gasston
      broken-links.com
        @stopsatgreen
“35 Awesome CSS3 Examples!”
“50+ Best CSS3 Examples!”
“Push Your Web Design Into
The Future With CSS3!”
“Amazing CSS3 Techniques
You Can’t live Without!”
“350+ Amazing CSS3 Resources
- All You'll Ever Need to
Become a CSS3 Master!”
BORDER-RADIUS

       border-radius: 5px;

   border-radius: 5px 5px 0 0;

  border-radius: 5px 0 / 2px 0;
BORDER-RADIUS
BOX & TEXT SHADOW

  box-shadow: 2px 2px 2px #000;

 text-shadow: 2px 2px 2px #000;

 text-shadow: inset 2px 2px #000;
BOX & TEXT SHADOW
BACKGROUNDS & BORDERS

background-image: url('img1.png'),
url('img2.png'), url('img3.png');

  border-image: url('img1.png')
  20 25 20 25 stretch;
BACKGROUNDS & BORDERS
BACKGROUNDS & BORDERS
SELECTORS
     :first-child | :last-child

  :first-of-type | :last-of-type

 :nth-child() | :nth-last-child()

:nth-of-type() | :nth-last-of-type()
SELECTORS

:nth-of-type(even):not(:last-of-type)
OPACITY, ALPHA & COLOUR

         opacity: 0.5;

   color: rgba(255,0,0,0.5);

    color: hsl(0,100%,50%);

  color: hsla(0,100%,50%,0.5);
OPACITY, ALPHA & COLOUR
INTERMISSION

<!--[if lt IE 9]>
div { behavior: url(/path/to/PIE.htc); }
<![endif]-->


    http://css3pie.com/
WEB FONTS

 @font-face {
   font-family: 'My Font';
   src: url('/path/to/font.woff');
 }

 h1 { font-family: 'My Font'; }


 http://fontsquirrel.com
WEB FONTS




  http://lostworldsfairs.com
MEDIA QUERIES

@media all and (min-device-width:480px)

@media all and (-webkit-pixel-ratio:2)

    @media screen not (monochrome)

 @media screen and (max-device-width:
 640px) and (-moz-touch-enabled: 1)
MEDIA QUERIES




  http://mediaqueri.es
LINEAR GRADIENTS

       linear-gradient(#f00,#00f);

 linear-gradient(45deg,#f00,#0f0,#00f);

repeating-linear-gradient(#f00,#00f 10%);
LINEAR GRADIENTS
RADIAL GRADIENTS

       radial-gradient(#f00,#00f);


repeating-radial-gradient(#f00,#00f 10%);
RADIAL GRADIENTS

 -moz-radial-gradient(100% 0,circle
 farthest-corner,#f00,#00f);

 -webkit-gradient(radial,100% 0,0,100%
 0,[number],from(#f00),to(#00f));
2   2
sqrt(x +y )
worst.
syntax.
ever.
GRADIENTS




http://leaverou.me/css3patterns/
TRANSITIONS

     transition: all 1s linear;

  transition:
  border-width 2s 500ms ease-in-out;
TRANSITIONS




http://broken-links.com/tests/upintheair
2D TRANSFORMATIONS

       transform: rotate(45deg);

     transform: skew(15deg,7.5deg);

transform: scale(2) translate(1em,-25px);
2D TRANSFORMATIONS




http://media.24ways.org/2009/14/5/index.html
3D TRANSFORMATIONS


  transform: rotate3d(1,1,0,45deg);

transform: translate3d(1em,-15px,10%);

    transform: scale3d(0.5,3,1.1);
3D TRANSFORMATIONS




http://broken-links.com/tests/nakamats
3D TRANSFORMATIONS




http://paulrhayes.com/experiments/sphere/
COMBINING EFFECTS




 http://thefeed.orange.co.uk
ANIMATIONS
  @keyframes 'name' {
    from { border-width: 10px; }
    50% { border-width: 1px; }
    to {
      border-width: 1px;
      height: 120px;
    }
  }

  div { animation: name 1s linear; }
ANIMATIONS




http://animatable.com/demos/madmanimation/
INTERMISSION
  <link href="basic.css"
  media="screen" rel="stylesheet">

  <link href="desktop.css"
  media="screen and (min-width:
  481px)" rel="stylesheet">

  <!--[if lt IE 9]>
  <link href="desktop.css"
  media="screen" rel="stylesheet">
  <![endif]-->
INTERMISSION
  <!--[if lt IE 9]>
  <link href="ie8.css"
  media="screen" rel="stylesheet">
  <![endif]-->

  <!--[if lt IE 8]>
  <link href="ie7.css"
  media="screen" rel="stylesheet">
  <![endif]-->

  etc.
INTERMISSION
       <html class="no-js">
<script src="modernizr.js"></script>
<html class="svg no-cssgradients">


   http://modernizr.com
INTERMISSION
div {
background: url('img.png');
background: linear-gradient(#f00,#00f);
transition: all 1s ease-in;
}

.multiplebgs div {
background: url('img1.png'),
url('img2.png'), url('img3.png');
}
GROUPING SELECTOR

 header h1, article h1, aside h1 {};

 :any(header,article,aside) h1 {}

 ol ul li a, ul ul li a, ul ul ul li
 a, ol ul ul li a {};

 :any(ol,ul,ul ul,ol ul) ul li a {}
CALCULATIONS

       width: calc(20em + 10px);

 width: calc((85% / 4) – (1em + 2px));

   border-width: calc(110px mod 4);
MULTIPLE COLUMNS
         column-count: 3;

        column-width: 25em;

        column-gap: 1.5em;

   column-rule: 3px double #f00;

        column-span: all;
FLEXIBLE BOX LAYOUT



         div { display: box; }
         .a,.b { box-flex: 1; }

         .a { box-flex: 3; }
         .b { box-flex: 2; }
FLEXIBLE BOX LAYOUT
                              c


                              a
        a
                              b




.a {                 div { box-orient:
box-flex: 0;         vertical; }
box-align: center;   .a,.b { box-
box-pack: center;    ordinal-group: 2; }
}                    .c { box-ordinal-
                     group: 1; }
GRID POSITIONING
             div {
             display: grid;
             grid-columns: 1fr
             1fr 2fr;
             grid-rows: 100px
             5em 1fr;
             }
GRID POSITIONING
            .a {
            grid-column: 2;
            grid-row: 3;
            grid-column-span: 2;
            }
TEMPLATE LAYOUT
          a


          b              a    b    c


          c




.a { position: a; }   div {
.b { position: b; }     display: 'abc';
.c { position: c; }   }
TEMPLATE LAYOUT
          a
                               c

                       a
      b       c                    b




div {                 div { display:
display: 'aa' 'bc';   'acc' 'a.b';}
}
REGIONS
    a     .x { flow-thread: a; }
          .y { flow-thread: b; }
    b     .a,.c {
            region-thread: a;
    c     }
          .b { region-thread: b; }
REGIONS
     1           .a,.b,.c,.d {
                   display: region;
             4   }
 2               .a { region-index:   1;   }
         3       .b { region-index:   2;   }
                 .c { region-index:   3;   }
                 .d { region-index:   4;   }
IMAGES
             background: url('
             img.png#xywh=0,20,25,30
             ');

             background: -moz-image-
             rect(url('img.png'),20,
             20,0,0);

background-image:
url('img.svg'),url('img.png') or #f00;
VARIABLES & MIXINS
     @var $myColor #f00;

     h1 { color: $myColor; }

      @mixin myStuff {
        color: #f00;
        font-size: 1.5em;
      }

      h1 {
        font-weight: bold;
        @mix myStuff;
      }
VARIABLES & MIXINS

   @mixin myStuff($myColor #f00) {
     color: $myColor;
     font-size: 1.5em;
   }

   h1 {
     font-weight: bold;
     @mix myStuff(#00f);
   }
FEATURE QUERIES
    @supports (display: grid) {}

  @supports (display: box) and
  (background: linear-gradient) {}

@supports not (transform: rotate3d) {}
CSS4
THANK YOU & GOOD NIGHT




Superman copyright is a contentious issue, but the images I use here belong to
   DC Comics and no permission was given. I hope they fall under fair use
  doctrines. You should buy a copy of All Star Superman – it's really good!
BUY MY BOOK
http://nostarch.com/css3.htm

Contenu connexe

En vedette (6)

Sky cards
Sky cardsSky cards
Sky cards
 
Entity Framework 4 In Microsoft Visual Studio 2010 - ericnel
Entity Framework 4 In Microsoft Visual Studio 2010 - ericnelEntity Framework 4 In Microsoft Visual Studio 2010 - ericnel
Entity Framework 4 In Microsoft Visual Studio 2010 - ericnel
 
Documenting from the Trenches
Documenting from the TrenchesDocumenting from the Trenches
Documenting from the Trenches
 
Mike Taulty OData (NxtGen User Group UK)
Mike Taulty OData (NxtGen User Group UK)Mike Taulty OData (NxtGen User Group UK)
Mike Taulty OData (NxtGen User Group UK)
 
Seminar: Bill Adams on the political ecology of biodiversity conservation
Seminar: Bill Adams on the political ecology of biodiversity conservation Seminar: Bill Adams on the political ecology of biodiversity conservation
Seminar: Bill Adams on the political ecology of biodiversity conservation
 
Manifesto: Monique Salomon - Prolinnova: global networking
Manifesto: Monique Salomon - Prolinnova: global networking Manifesto: Monique Salomon - Prolinnova: global networking
Manifesto: Monique Salomon - Prolinnova: global networking
 

Similaire à The CSS3 of Tomorrow

Big Design Conference: CSS3
Big Design Conference: CSS3 Big Design Conference: CSS3
Big Design Conference: CSS3
Wynn Netherland
 
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive NewsMobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
Kaelig Deloumeau-Prigent
 
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte eventHTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
Robert Nyman
 

Similaire à The CSS3 of Tomorrow (20)

Learn to Love CSS3 [English]
Learn to Love CSS3 [English]Learn to Love CSS3 [English]
Learn to Love CSS3 [English]
 
Learn to love CSS3 | Joomla! Day Deutschland
Learn to love CSS3 | Joomla! Day DeutschlandLearn to love CSS3 | Joomla! Day Deutschland
Learn to love CSS3 | Joomla! Day Deutschland
 
Big Design Conference: CSS3
Big Design Conference: CSS3 Big Design Conference: CSS3
Big Design Conference: CSS3
 
I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not Flash
 
CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)
CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)
CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)
 
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive NewsMobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
 
What I discovered about layout vis CSS Grid
What I discovered about layout vis CSS GridWhat I discovered about layout vis CSS Grid
What I discovered about layout vis CSS Grid
 
Sass, Compass
Sass, CompassSass, Compass
Sass, Compass
 
popular posts widget
popular posts widgetpopular posts widget
popular posts widget
 
Talk Web Design: Get Ready For CSS Grid Layout
Talk Web Design: Get Ready For CSS Grid LayoutTalk Web Design: Get Ready For CSS Grid Layout
Talk Web Design: Get Ready For CSS Grid Layout
 
PreDevCampSF - CSS3 Tricks
PreDevCampSF - CSS3 TricksPreDevCampSF - CSS3 Tricks
PreDevCampSF - CSS3 Tricks
 
FCIP SASS Talk
FCIP SASS TalkFCIP SASS Talk
FCIP SASS Talk
 
The Future of Frontend - what is new in CSS?
The Future of Frontend - what is new in CSS?The Future of Frontend - what is new in CSS?
The Future of Frontend - what is new in CSS?
 
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte eventHTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
 
Eye Candy Without Images: Fun With CSS3
Eye Candy Without Images: Fun With CSS3Eye Candy Without Images: Fun With CSS3
Eye Candy Without Images: Fun With CSS3
 
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
 
Refresh Tallahassee: The RE/MAX Front End Story
Refresh Tallahassee: The RE/MAX Front End StoryRefresh Tallahassee: The RE/MAX Front End Story
Refresh Tallahassee: The RE/MAX Front End Story
 
Simple flat ui css accordion
Simple flat ui css accordionSimple flat ui css accordion
Simple flat ui css accordion
 
Making Links Magical Again with CSS
Making Links Magical Again with CSSMaking Links Magical Again with CSS
Making Links Magical Again with CSS
 
Compass, Sass, and the Enlightened CSS Developer
Compass, Sass, and the Enlightened CSS DeveloperCompass, Sass, and the Enlightened CSS Developer
Compass, Sass, and the Enlightened CSS Developer
 

Dernier

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

The CSS3 of Tomorrow