SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
Tecniche di animazione
digitale 1
Tecniche di animazione
digitale 1

Michele Bertoli
Founder / Lead Software Engineer at Igloo
igloolab.com
michele.bertoli@accademiasantagiulia.it
Basic 4
December 12, 2012
Agenda
CSS selectors    5


                 10
CSS3
                 40
Web typography
CSS selectors
CSS selectors
● #id
● .class
● element




                6   Basic / CSS selectors
CSS selectors
● element element

● element > element: select elements with a specific parent.
  http://jsfiddle.net/MicheleBertoli/pvUnR

● element + element: select elements that is placed
   immediately after (not inside) the first specified element.
  http://jsfiddle.net/MicheleBertoli/xRQwD

                           7   Basic / CSS selectors
CSS selectors
● attribute
● [attribute=value]
● [attribute~=value]: select elements with an attribute
  value containing a specified word.
● [attribute|=value]: select elements with the specified
  attribute starting with the specified value.

  http://jsfiddle.net/MicheleBertoli/uBxsU


                          8   Basic / CSS selectors
CSS selectors
●   :link               ●   :first-letter
●   :visited            ●   :first-line
●   :active             ●   :first-child
●   :hover              ●   :before
●   :focus              ●   :after

    http://jsfiddle.net/MicheleBertoli/xu95F



                            9   Basic / CSS selectors
Priority level of selector
● style attribute = a
● number of ID attributes in the selector = b
● number of other attributes and pseudo-classes in the
  selector = c
● number of element names and pseudo-elements in the
  selector = d




                       10   Basic / CSS selectors
Efficiency
●   ID, e.g. #header
●   Class, e.g. .promo
●   Type, e.g. div
●   Adjacent sibling, e.g. h2 + p
●   Child, e.g. li > ul
●   Descendant, e.g. ul a
●   Universal, i.e. *
●   Attribute, e.g. [type="text"]
●   Pseudo-classes/-elements, e.g. a:hover



                                11   Basic / CSS selectors
CSS3
Introduction
Cascading Style Sheets is a style sheet language used for
describing the presentation semantics (the look and
formatting) of a document written in a markup language.




                          13   Basic / CSS3
CSS3 modules
CSS3 is split up into "modules".
Some of the most important CSS3 modules are:
●   Selectors
●   Box Model
●   Backgrounds and Borders
●   Text Effects
●   2D/3D Transformations
●   Animations
●   Multiple Column Layout
●   User Interface
                              14   Basic / CSS3
CSS3 selectors
● element1 ~ element2: matches occurrences of element2
   that are preceded by element1.
● [attribute^=value]: matches every element whose
   attribute value begins with a specified value.
● [attribute$=value]: matches every element whose
   attribute value ends with a specified value.
● [attribute*=value]: matches every element whose
   attribute value containing a specified value.
  http://jsfiddle.net/MicheleBertoli/uBxsU/1
                       15   Basic / CSS3
CSS3 selectors
● :first-of-type
● :last-of-type
● :only-of-type

   http://jsfiddle.net/MicheleBertoli/uBxsU/2




                          16   Basic / CSS3
CSS3 selectors
●   :only-child
●   :nth-child(n)
●   :nth-last-child(n)
●   :nth-of-type(n)
●   :nth-last-of-type(n)
●   :last-child

    http://jsfiddle.net/MicheleBertoli/uBxsU/3


                           17   Basic / CSS3
CSS3 selectors
●   :root
●   :empty
●   :target
●   :enabled
●   :disabled
●   :checked
●   :not(selector)
●   ::selection

                     18   Basic / CSS3
Border radius
  div
  {
        border:5px solid #ccc;
        border-radius:10px;
  }




 http://jsfiddle.net/MicheleBertoli/Akt8x




                                 19   Basic / CSS3
Box shadow
  div
  {
        box-shadow:10px 10px 5px #ccc;
  }




 http://jsfiddle.net/MicheleBertoli/2BLt5




                              20   Basic / CSS3
Text shadow
  h1
  {
       text-shadow:5px 5px #ccc;
  }




 http://jsfiddle.net/MicheleBertoli/nv8LL




                             21    Basic / CSS3
PrefixFree
-prefix-free lets you use only unprefixed CSS properties
everywhere. It works behind the scenes, adding the current
browser’s prefix to any CSS code, only when it’s needed.

   http://leaverou.github.com/prefixfree




                           22   Basic / CSS3
Coffee Break
Web typography
Introduction
Web typography refers to the use of fonts on the World Wide
Web.




                          25   Basic / Web typography
Properties
●   font-family
●   font-style
●   font-variant
●   font-weight
●   font-size




                   26   Basic / Web typography
Line height
On inline elements, the line-height CSS property specifies the
height that is used in the calculation of the line box height.
On block level elements, line-height specifies the minimal
height of line boxes within the element.

    line-height:20px;




   http://jsfiddle.net/MicheleBertoli/b3bRb

                             27   Basic / Web typography
Web-safe fonts
Web-safe fonts are fonts likely to be present on a wide range
of computer systems, and used by Web content authors to
increase the likelihood that content will be displayed in their
chosen font.




                           28   Basic / Web typography
@font-face
@font-face is a css rule which allows you to download a
particular font from your server to render a webpage if the
user hasn't got that font installed.




                             29   Basic / Web typography
Formats
●   WOFF (Web Open Font Format) .woff
●   TrueType .ttf
●   OpenType .ttf, .otf
●   Embedded OpenType .eot
●   SVG Font .svg, .svgz




                         30   Basic / Web typography
Browser support
Internet Explorer only supports EOT
Mozilla browsers support OTF and TTF
Safari and Opera support OTF, TTF and SVG
Chrome supports TTF and SVG.




                           31   Basic / Web typography
Usage
 @font-face
 {
       font-family: myFirstFont;
       src:url("Sansation_Light.ttf"),
           url("Sansation_Light.eot");
 }


 div
 {
       font-family: myFirstFont;
 }




                             32    Basic / Web typography
Google web fonts
Google web fonts makes it quick and easy for everyone to use
web fonts, including professional designers and developers.

   <link rel="stylesheet" type="text/css" href="http://fonts.
   googleapis.com/css?family=Tangerine">
   <style>
       body
       {
             font-family:"Tangerine", serif;
       }
   </style>




                               33   Basic / Web typography
Samples
 http://www.alistapart.com
 http://theharrietseries.com
 http://blakeallendesign.com
 http://aworkinglibrary.com
 http://informationarchitects.net




                        34   Basic / Web typography
Thank you

Weitere ähnliche Inhalte

Was ist angesagt?

ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 3/3 - Web components avec ...
ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 3/3 - Web components avec ...ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 3/3 - Web components avec ...
ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 3/3 - Web components avec ...Horacio Gonzalez
 
Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
Drupal7 Theming session on the occassion of  Drupal7 release party in Delhi NCRDrupal7 Theming session on the occassion of  Drupal7 release party in Delhi NCR
Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCRGaurav Mishra
 
How to use CSS3 in WordPress
How to use CSS3 in WordPressHow to use CSS3 in WordPress
How to use CSS3 in WordPressSuzette Franck
 
Div Tag Tutorial
Div Tag TutorialDiv Tag Tutorial
Div Tag Tutorialbav123
 
Languages for web(HTML,CSS,JS)
Languages for web(HTML,CSS,JS)Languages for web(HTML,CSS,JS)
Languages for web(HTML,CSS,JS)MHR11
 
Basics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPointBasics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPointSahil Gandhi
 
Css Best Practices
Css Best PracticesCss Best Practices
Css Best Practicessachin9737
 
Devoxx France - Web Components, Polymer et Material Design
Devoxx France -  Web Components, Polymer et Material DesignDevoxx France -  Web Components, Polymer et Material Design
Devoxx France - Web Components, Polymer et Material DesignHoracio Gonzalez
 
Component Driven Design and Development
Component Driven Design and DevelopmentComponent Driven Design and Development
Component Driven Design and DevelopmentCristina Chumillas
 
BEM Methodology — @Frontenders Ticino —17/09/2014
BEM Methodology — @Frontenders Ticino —17/09/2014BEM Methodology — @Frontenders Ticino —17/09/2014
BEM Methodology — @Frontenders Ticino —17/09/2014vzaccaria
 
Modern Front-End Development
Modern Front-End DevelopmentModern Front-End Development
Modern Front-End Developmentmwrather
 
Bootstrap webtech presentation - new
Bootstrap   webtech presentation - newBootstrap   webtech presentation - new
Bootstrap webtech presentation - newWebtech Learning
 

Was ist angesagt? (19)

ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 3/3 - Web components avec ...
ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 3/3 - Web components avec ...ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 3/3 - Web components avec ...
ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 3/3 - Web components avec ...
 
Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
Drupal7 Theming session on the occassion of  Drupal7 release party in Delhi NCRDrupal7 Theming session on the occassion of  Drupal7 release party in Delhi NCR
Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
 
How to use CSS3 in WordPress
How to use CSS3 in WordPressHow to use CSS3 in WordPress
How to use CSS3 in WordPress
 
Div Tag Tutorial
Div Tag TutorialDiv Tag Tutorial
Div Tag Tutorial
 
Languages for web(HTML,CSS,JS)
Languages for web(HTML,CSS,JS)Languages for web(HTML,CSS,JS)
Languages for web(HTML,CSS,JS)
 
Basics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPointBasics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPoint
 
Css Best Practices
Css Best PracticesCss Best Practices
Css Best Practices
 
Devoxx France - Web Components, Polymer et Material Design
Devoxx France -  Web Components, Polymer et Material DesignDevoxx France -  Web Components, Polymer et Material Design
Devoxx France - Web Components, Polymer et Material Design
 
Style and Selector
Style and SelectorStyle and Selector
Style and Selector
 
ActiveDOM
ActiveDOMActiveDOM
ActiveDOM
 
Tools for Modern Web Design
Tools for Modern Web DesignTools for Modern Web Design
Tools for Modern Web Design
 
CSS Introduction
CSS IntroductionCSS Introduction
CSS Introduction
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
Component Driven Design and Development
Component Driven Design and DevelopmentComponent Driven Design and Development
Component Driven Design and Development
 
Java script
Java scriptJava script
Java script
 
BEM Methodology — @Frontenders Ticino —17/09/2014
BEM Methodology — @Frontenders Ticino —17/09/2014BEM Methodology — @Frontenders Ticino —17/09/2014
BEM Methodology — @Frontenders Ticino —17/09/2014
 
Modern Front-End Development
Modern Front-End DevelopmentModern Front-End Development
Modern Front-End Development
 
Bootstrap webtech presentation - new
Bootstrap   webtech presentation - newBootstrap   webtech presentation - new
Bootstrap webtech presentation - new
 
CSS Box Model
CSS Box ModelCSS Box Model
CSS Box Model
 

Ähnlich wie #4 - CSS Selectors, CSS3 and Web typography

Introduction to HTML+CSS+Javascript.pptx
Introduction to HTML+CSS+Javascript.pptxIntroduction to HTML+CSS+Javascript.pptx
Introduction to HTML+CSS+Javascript.pptxKADAMBARIPUROHIT
 
Introduction to HTML+CSS+Javascript.pptx
Introduction to HTML+CSS+Javascript.pptxIntroduction to HTML+CSS+Javascript.pptx
Introduction to HTML+CSS+Javascript.pptxAliRaza899305
 
Web Development basics with WordPress
Web Development basics with WordPressWeb Development basics with WordPress
Web Development basics with WordPressRashna Maharjan
 
Bootstrap 3 - Sleek, intuitive, and powerful mobile first front-end framework...
Bootstrap 3 - Sleek, intuitive, and powerful mobile first front-end framework...Bootstrap 3 - Sleek, intuitive, and powerful mobile first front-end framework...
Bootstrap 3 - Sleek, intuitive, and powerful mobile first front-end framework...Cedric Spillebeen
 
wd project.pptx
wd project.pptxwd project.pptx
wd project.pptxdsffsdf1
 
Workflow Essentials for Web Development
Workflow Essentials for Web DevelopmentWorkflow Essentials for Web Development
Workflow Essentials for Web DevelopmentXavier Porter
 
Introduction to HTML-CSS-Javascript.pdf
Introduction to HTML-CSS-Javascript.pdfIntroduction to HTML-CSS-Javascript.pdf
Introduction to HTML-CSS-Javascript.pdfDakshPratapSingh1
 
A Complete Guide to Frontend - UI Developer
A Complete Guide to Frontend - UI DeveloperA Complete Guide to Frontend - UI Developer
A Complete Guide to Frontend - UI Developernariyaravi
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Hatem Mahmoud
 
You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)Igalia
 
Front End Good Practices
Front End Good PracticesFront End Good Practices
Front End Good PracticesHernan Mammana
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Anupam Ranku
 
HTML5, CSS, JavaScript Style guide and coding conventions
HTML5, CSS, JavaScript Style guide and coding conventionsHTML5, CSS, JavaScript Style guide and coding conventions
HTML5, CSS, JavaScript Style guide and coding conventionsKnoldus Inc.
 
CSS Methodology
CSS MethodologyCSS Methodology
CSS MethodologyZohar Arad
 
Web development basics (Part-1)
Web development basics (Part-1)Web development basics (Part-1)
Web development basics (Part-1)Rajat Pratap Singh
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentEvan Mullins
 
Modern UI Architecture_ Trends and Technologies in Web Development
Modern UI Architecture_ Trends and Technologies in Web DevelopmentModern UI Architecture_ Trends and Technologies in Web Development
Modern UI Architecture_ Trends and Technologies in Web DevelopmentSuresh Patidar
 

Ähnlich wie #4 - CSS Selectors, CSS3 and Web typography (20)

Introduction to HTML+CSS+Javascript.pptx
Introduction to HTML+CSS+Javascript.pptxIntroduction to HTML+CSS+Javascript.pptx
Introduction to HTML+CSS+Javascript.pptx
 
Introduction to HTML+CSS+Javascript.pptx
Introduction to HTML+CSS+Javascript.pptxIntroduction to HTML+CSS+Javascript.pptx
Introduction to HTML+CSS+Javascript.pptx
 
Web Development basics with WordPress
Web Development basics with WordPressWeb Development basics with WordPress
Web Development basics with WordPress
 
Bootstrap 3 - Sleek, intuitive, and powerful mobile first front-end framework...
Bootstrap 3 - Sleek, intuitive, and powerful mobile first front-end framework...Bootstrap 3 - Sleek, intuitive, and powerful mobile first front-end framework...
Bootstrap 3 - Sleek, intuitive, and powerful mobile first front-end framework...
 
wd project.pptx
wd project.pptxwd project.pptx
wd project.pptx
 
Workflow Essentials for Web Development
Workflow Essentials for Web DevelopmentWorkflow Essentials for Web Development
Workflow Essentials for Web Development
 
Introduction to HTML-CSS-Javascript.pdf
Introduction to HTML-CSS-Javascript.pdfIntroduction to HTML-CSS-Javascript.pdf
Introduction to HTML-CSS-Javascript.pdf
 
A Complete Guide to Frontend - UI Developer
A Complete Guide to Frontend - UI DeveloperA Complete Guide to Frontend - UI Developer
A Complete Guide to Frontend - UI Developer
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01
 
You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)
 
Html5
Html5Html5
Html5
 
Intro to web dev
Intro to web devIntro to web dev
Intro to web dev
 
Front End Good Practices
Front End Good PracticesFront End Good Practices
Front End Good Practices
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
 
Using a CSS Framework
Using a CSS FrameworkUsing a CSS Framework
Using a CSS Framework
 
HTML5, CSS, JavaScript Style guide and coding conventions
HTML5, CSS, JavaScript Style guide and coding conventionsHTML5, CSS, JavaScript Style guide and coding conventions
HTML5, CSS, JavaScript Style guide and coding conventions
 
CSS Methodology
CSS MethodologyCSS Methodology
CSS Methodology
 
Web development basics (Part-1)
Web development basics (Part-1)Web development basics (Part-1)
Web development basics (Part-1)
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
 
Modern UI Architecture_ Trends and Technologies in Web Development
Modern UI Architecture_ Trends and Technologies in Web DevelopmentModern UI Architecture_ Trends and Technologies in Web Development
Modern UI Architecture_ Trends and Technologies in Web Development
 

Mehr von iloveigloo

#7 - Client-side web apps, MVC and jQuery
#7 - Client-side web apps, MVC and jQuery#7 - Client-side web apps, MVC and jQuery
#7 - Client-side web apps, MVC and jQueryiloveigloo
 
#6 - Template Engine: Mustache.js
#6 - Template Engine: Mustache.js#6 - Template Engine: Mustache.js
#6 - Template Engine: Mustache.jsiloveigloo
 
#2 - CSS Layouts Overview
#2 - CSS Layouts Overview#2 - CSS Layouts Overview
#2 - CSS Layouts Overviewiloveigloo
 
#1 - HTML5 Overview
#1 - HTML5 Overview#1 - HTML5 Overview
#1 - HTML5 Overviewiloveigloo
 
Client-side MVC with Backbone.js (reloaded)
Client-side MVC with Backbone.js (reloaded)Client-side MVC with Backbone.js (reloaded)
Client-side MVC with Backbone.js (reloaded)iloveigloo
 
Client-side MVC with Backbone.js
Client-side MVC with Backbone.js Client-side MVC with Backbone.js
Client-side MVC with Backbone.js iloveigloo
 
Shoppingsquare
ShoppingsquareShoppingsquare
Shoppingsquareiloveigloo
 

Mehr von iloveigloo (8)

#7 - Client-side web apps, MVC and jQuery
#7 - Client-side web apps, MVC and jQuery#7 - Client-side web apps, MVC and jQuery
#7 - Client-side web apps, MVC and jQuery
 
#6 - Template Engine: Mustache.js
#6 - Template Engine: Mustache.js#6 - Template Engine: Mustache.js
#6 - Template Engine: Mustache.js
 
$$$ SOLDI $$$
$$$ SOLDI $$$$$$ SOLDI $$$
$$$ SOLDI $$$
 
#2 - CSS Layouts Overview
#2 - CSS Layouts Overview#2 - CSS Layouts Overview
#2 - CSS Layouts Overview
 
#1 - HTML5 Overview
#1 - HTML5 Overview#1 - HTML5 Overview
#1 - HTML5 Overview
 
Client-side MVC with Backbone.js (reloaded)
Client-side MVC with Backbone.js (reloaded)Client-side MVC with Backbone.js (reloaded)
Client-side MVC with Backbone.js (reloaded)
 
Client-side MVC with Backbone.js
Client-side MVC with Backbone.js Client-side MVC with Backbone.js
Client-side MVC with Backbone.js
 
Shoppingsquare
ShoppingsquareShoppingsquare
Shoppingsquare
 

#4 - CSS Selectors, CSS3 and Web typography

  • 2. Tecniche di animazione digitale 1 Michele Bertoli Founder / Lead Software Engineer at Igloo igloolab.com michele.bertoli@accademiasantagiulia.it
  • 4. Agenda CSS selectors 5 10 CSS3 40 Web typography
  • 6. CSS selectors ● #id ● .class ● element 6 Basic / CSS selectors
  • 7. CSS selectors ● element element ● element > element: select elements with a specific parent. http://jsfiddle.net/MicheleBertoli/pvUnR ● element + element: select elements that is placed immediately after (not inside) the first specified element. http://jsfiddle.net/MicheleBertoli/xRQwD 7 Basic / CSS selectors
  • 8. CSS selectors ● attribute ● [attribute=value] ● [attribute~=value]: select elements with an attribute value containing a specified word. ● [attribute|=value]: select elements with the specified attribute starting with the specified value. http://jsfiddle.net/MicheleBertoli/uBxsU 8 Basic / CSS selectors
  • 9. CSS selectors ● :link ● :first-letter ● :visited ● :first-line ● :active ● :first-child ● :hover ● :before ● :focus ● :after http://jsfiddle.net/MicheleBertoli/xu95F 9 Basic / CSS selectors
  • 10. Priority level of selector ● style attribute = a ● number of ID attributes in the selector = b ● number of other attributes and pseudo-classes in the selector = c ● number of element names and pseudo-elements in the selector = d 10 Basic / CSS selectors
  • 11. Efficiency ● ID, e.g. #header ● Class, e.g. .promo ● Type, e.g. div ● Adjacent sibling, e.g. h2 + p ● Child, e.g. li > ul ● Descendant, e.g. ul a ● Universal, i.e. * ● Attribute, e.g. [type="text"] ● Pseudo-classes/-elements, e.g. a:hover 11 Basic / CSS selectors
  • 12. CSS3
  • 13. Introduction Cascading Style Sheets is a style sheet language used for describing the presentation semantics (the look and formatting) of a document written in a markup language. 13 Basic / CSS3
  • 14. CSS3 modules CSS3 is split up into "modules". Some of the most important CSS3 modules are: ● Selectors ● Box Model ● Backgrounds and Borders ● Text Effects ● 2D/3D Transformations ● Animations ● Multiple Column Layout ● User Interface 14 Basic / CSS3
  • 15. CSS3 selectors ● element1 ~ element2: matches occurrences of element2 that are preceded by element1. ● [attribute^=value]: matches every element whose attribute value begins with a specified value. ● [attribute$=value]: matches every element whose attribute value ends with a specified value. ● [attribute*=value]: matches every element whose attribute value containing a specified value. http://jsfiddle.net/MicheleBertoli/uBxsU/1 15 Basic / CSS3
  • 16. CSS3 selectors ● :first-of-type ● :last-of-type ● :only-of-type http://jsfiddle.net/MicheleBertoli/uBxsU/2 16 Basic / CSS3
  • 17. CSS3 selectors ● :only-child ● :nth-child(n) ● :nth-last-child(n) ● :nth-of-type(n) ● :nth-last-of-type(n) ● :last-child http://jsfiddle.net/MicheleBertoli/uBxsU/3 17 Basic / CSS3
  • 18. CSS3 selectors ● :root ● :empty ● :target ● :enabled ● :disabled ● :checked ● :not(selector) ● ::selection 18 Basic / CSS3
  • 19. Border radius div { border:5px solid #ccc; border-radius:10px; } http://jsfiddle.net/MicheleBertoli/Akt8x 19 Basic / CSS3
  • 20. Box shadow div { box-shadow:10px 10px 5px #ccc; } http://jsfiddle.net/MicheleBertoli/2BLt5 20 Basic / CSS3
  • 21. Text shadow h1 { text-shadow:5px 5px #ccc; } http://jsfiddle.net/MicheleBertoli/nv8LL 21 Basic / CSS3
  • 22. PrefixFree -prefix-free lets you use only unprefixed CSS properties everywhere. It works behind the scenes, adding the current browser’s prefix to any CSS code, only when it’s needed. http://leaverou.github.com/prefixfree 22 Basic / CSS3
  • 25. Introduction Web typography refers to the use of fonts on the World Wide Web. 25 Basic / Web typography
  • 26. Properties ● font-family ● font-style ● font-variant ● font-weight ● font-size 26 Basic / Web typography
  • 27. Line height On inline elements, the line-height CSS property specifies the height that is used in the calculation of the line box height. On block level elements, line-height specifies the minimal height of line boxes within the element. line-height:20px; http://jsfiddle.net/MicheleBertoli/b3bRb 27 Basic / Web typography
  • 28. Web-safe fonts Web-safe fonts are fonts likely to be present on a wide range of computer systems, and used by Web content authors to increase the likelihood that content will be displayed in their chosen font. 28 Basic / Web typography
  • 29. @font-face @font-face is a css rule which allows you to download a particular font from your server to render a webpage if the user hasn't got that font installed. 29 Basic / Web typography
  • 30. Formats ● WOFF (Web Open Font Format) .woff ● TrueType .ttf ● OpenType .ttf, .otf ● Embedded OpenType .eot ● SVG Font .svg, .svgz 30 Basic / Web typography
  • 31. Browser support Internet Explorer only supports EOT Mozilla browsers support OTF and TTF Safari and Opera support OTF, TTF and SVG Chrome supports TTF and SVG. 31 Basic / Web typography
  • 32. Usage @font-face { font-family: myFirstFont; src:url("Sansation_Light.ttf"), url("Sansation_Light.eot"); } div { font-family: myFirstFont; } 32 Basic / Web typography
  • 33. Google web fonts Google web fonts makes it quick and easy for everyone to use web fonts, including professional designers and developers. <link rel="stylesheet" type="text/css" href="http://fonts. googleapis.com/css?family=Tangerine"> <style> body { font-family:"Tangerine", serif; } </style> 33 Basic / Web typography
  • 34. Samples http://www.alistapart.com http://theharrietseries.com http://blakeallendesign.com http://aworkinglibrary.com http://informationarchitects.net 34 Basic / Web typography