SlideShare a Scribd company logo
UI DESIGN
WITH HTML5 & CSS3
Shay Howe
@shayhowe
www.shayhowe.com
UI Design with HTML5 & CSS3
SHAY HOWE
www.shayhowe.com – @shayhowe
@shayhowe
HTML5 & CSS3
HTML
Accessibility, Audio & Video Support, Figure Elements,
Forms & Validation, New Elements & Attributes, Revised
Elements & Attributes, Semantics, Structural Elements,
Textual Elements, & more.
CSS
Animations, Backgrounds, Borders, Flexible Grids,
Responsive Design, Rounded Corners, Selectors,
Shadows, Transforms, Transitions, Transparency,
Typography, & more.
@shayhoweUI Design with HTML5 & CSS3
HTML5 & CSS3
HTML
Accessibility, Audio & Video Support, Figure Elements,
Forms & Validation, New Elements & Attributes, Revised
Elements & Attributes, Semantics, Structural Elements,
Textual Elements, & more.
CSS
Animations, Backgrounds, Borders, Flexible Grids,
Responsive Design, Rounded Corners, Selectors,
Shadows, Transforms, Transitions, Transparency,
Typography, & more.
@shayhoweUI Design with HTML5 & CSS3
TOOLTIP
@shayhoweUI Design with HTML5 & CSS3
TOOLTIP MARKUP
<p>
    Beginning  of  a  general  paragraph  of  text...
    <b  class="tooltip">
        tooltip  to  rollover
        <span>
            Text  to  be  displayed  within  the  tooltip.
        </span>
    </b>
    ...ending  of  the  paragraph.
</p>
@shayhoweUI Design with HTML5 & CSS3
SHOW/HIDE TOOLTIP
.tooltip  {
    border-­‐bottom:  1px  solid  #aaa;
}
.tooltip  span  {
    background:  #000;
    background:  rgba(0,  0,  0,  0.8);
    display:  block;
    padding:  10px  12px;
    opacity:  0;
    width:  100%
}
.tooltip:hover  span  {
    opacity:  1;
}
@shayhoweUI Design with HTML5 & CSS3
TOOLTIP POSITION
.tooltip  {
    ...
    position:  relative;
}
.tooltip  span  {
    ...
    bottom:  100%;
    left:  -­‐12px;
    position:  absolute;
}
@shayhoweUI Design with HTML5 & CSS3
TOOLTIP POSITION
@shayhoweUI Design with HTML5 & CSS3
TOOLTIP ROUNDED CORNERS
.tooltip  span  {
    ...
    -­‐webkit-­‐border-­‐radius:  4px;
          -­‐moz-­‐border-­‐radius:  4px;
            -­‐ms-­‐border-­‐radius:  4px;
              -­‐o-­‐border-­‐radius:  4px;
                    border-­‐radius:  4px;
}
@shayhoweUI Design with HTML5 & CSS3
TOOLTIP ROUNDED CORNERS
@shayhoweUI Design with HTML5 & CSS3
TOOLTIP SHADOWS
.tooltip  span  {
    ...
    -­‐webkit-­‐box-­‐shadow:  inset  0  1px  3px  #000;
          -­‐moz-­‐box-­‐shadow:  inset  0  1px  3px  #000;
            -­‐ms-­‐box-­‐shadow:  inset  0  1px  3px  #000;
              -­‐o-­‐box-­‐shadow:  inset  0  1px  3px  #000;
                    box-­‐shadow:  inset  0  1px  3px  #000;
    text-­‐shadow:  0  1px  0  #000;
}
@shayhoweUI Design with HTML5 & CSS3
TOOLTIP SHADOWS
@shayhoweUI Design with HTML5 & CSS3
TOOLTIP ARROW
.tooltip  span:after  {
    border-­‐left:  6px  solid  transparent;
    border-­‐right:  6px  solid  transparent;
    border-­‐top:  6px  solid  #000;
    border-­‐top:  6px  solid  rgba(0,  0,  0,  0.8);
    bottom:  -­‐6px;
    content:  "";
    height:  0;
    left:  25%;
    position:  absolute;
    width:  0;
}
@shayhoweUI Design with HTML5 & CSS3
TOOLTIP ARROW
@shayhoweUI Design with HTML5 & CSS3
RECAP
HTML
Accessibility
Semantics
CSS
Backgrounds
Box & Text Shadows
Position
Pseudo Selectors
Rounded Corners
Transparency
@shayhoweUI Design with HTML5 & CSS3
DOWNLOADS
@shayhoweUI Design with HTML5 & CSS3
DOWNLOADS MARKUP
<ul>
    <li>
        <a  href="files/pdf-­‐document.pdf">
            PDF  Document
        </a>
    </li>
    <li>
        <a  href="files/word-­‐document.doc">
            Word  Document
        </a>
    </li>
    ...
</ul>
@shayhoweUI Design with HTML5 & CSS3
DOWNLOAD ATTRIBUTE
<ul>
    <li>
        <a  href="files/pdf-­‐document.pdf"  download>
            PDF  Document
        </a>
    </li>
    <li>
        <a  href="files/word-­‐document.doc"  
        download="super-­‐unique-­‐file-­‐name.doc">
            Word  Document
        </a>
    </li>
    ...
</ul>
@shayhoweUI Design with HTML5 & CSS3
GENERAL LIST STYLES
ul  {
    border-­‐top:  1px  solid  #ddd;
    list-­‐style:  none;
}
li  {
    border-­‐bottom:  1px  solid  #ddd;
    padding:  10px  0;
}
@shayhoweUI Design with HTML5 & CSS3
GENERAL LIST STYLES
@shayhoweUI Design with HTML5 & CSS3
ADDING ICONS
li  a  {
    padding:  1px  0  1px  22px;
}
li  a[href$=".pdf"]  {
    background:  url("pdf.png")  0  50%  no-­‐repeat;
}
li  a[href$=".doc"]  {
    background:  url("doc.png")  0  50%  no-­‐repeat;
}
li  a[href$=".jpg"]  {
    background:  url("image.png")  0  50%  no-­‐repeat;
}
...
@shayhoweUI Design with HTML5 & CSS3
ADDING ICONS
@shayhoweUI Design with HTML5 & CSS3
ADDING FILE PATHS
li  a[href$=".pdf"]:after,
li  a[href$=".doc"]:after,
li  a[href$=".jpg"]:after,
li  a[href$=".mp3"]:after,
li  a[href$=".mp4"]:after  {
    color:  #aaa;
    content:  "  ("  attr(href)  ")";
    font-­‐size:  11px;
}
@shayhoweUI Design with HTML5 & CSS3
ADDING FILE PATHS
@shayhoweUI Design with HTML5 & CSS3
DOWNLOAD ATTRIBUTE SUPPORT
li  a[href$=".pdf"][download]:not([download=""]):after,
li  a[href$=".doc"][download]:not([download=""]):after,
li  a[href$=".jpg"][download]:not([download=""]):after,
li  a[href$=".mp3"][download]:not([download=""]):after,
li  a[href$=".mp4"][download]:not([download=""]):after  {
    content:  "  ("  attr(download)  ")";
}
@shayhoweUI Design with HTML5 & CSS3
ADDING FILE PATHS
@shayhoweUI Design with HTML5 & CSS3
GETTING RESPONSIVE
@media  only  screen  and  (min-­‐width:  320px)  {
    a[href$=".pdf"]:after,
    a[href$=".doc"]:after,
    a[href$=".jpg"]:after,
    a[href$=".mp3"]:after,
    a[href$=".mp4"]:after  {
        color:  #aaa;
        content:  "  ("  attr(href)  ")";
        font-­‐size:  11px;
    }
    ...
}
@shayhoweUI Design with HTML5 & CSS3
GOING MOBILE
@shayhoweUI Design with HTML5 & CSS3
RECAP
HTML
Accessibility
Download Attribute
Semantics
CSS
Responsive Design
Attribute, Negation, & Pseudo Selectors
@shayhoweUI Design with HTML5 & CSS3
FORMS
@shayhoweUI Design with HTML5 & CSS3
FORM MARKUP
<form>
    <label>
        Departure  City
        <input  type="text"  name="departure-­‐city">
    </label>
    <label>
        Departure  Date  <span>(YYYY-­‐MM-­‐DD)</span>
        <input  type="date"  name="departure-­‐date">
    </label>
    ...
    <button>Search</button>
</form>
@shayhoweUI Design with HTML5 & CSS3
FORM MARKUP
@shayhoweUI Design with HTML5 & CSS3
FORM MARKUP
@shayhoweUI Design with HTML5 & CSS3
INPUT PLACEHOLDERS
<input  type="text"  name="departure-­‐city"
    placeholder="City  or  Airport  Code">
<input  type="date"  name="departure-­‐date"
    placeholder="YYYY-­‐MM-­‐DD">
@shayhoweUI Design with HTML5 & CSS3
INPUT PLACEHOLDERS
@shayhoweUI Design with HTML5 & CSS3
INPUT ASSISTANCE
<input  type="text"  name="departure-­‐city"
    placeholder="City  or  Airport  Code"  
    list="cities">
<datalist  id="cities">
    <option  value="Boston  (BOS)">
    <option  value="Chicago  (ORD)">
    <option  value="New  York  (LGA)">
    <option  value="San  Francisco  (SFO)">
    <option  value="Seattle  (SEA)">
</datalist>
@shayhoweUI Design with HTML5 & CSS3
INPUT ASSISTANCE
@shayhoweUI Design with HTML5 & CSS3
REQUIRED INPUTS
<input  type="text"  name="departure-­‐city"
    placeholder="City  or  Airport  Code"  
    list="cities"  required>
@shayhoweUI Design with HTML5 & CSS3
REQUIRED INPUTS
<input  type="date"  name="departure-­‐date"
    placeholder="YYYY-­‐MM-­‐DD"  required>
@shayhoweUI Design with HTML5 & CSS3
INPUT PATTERNS
<input  type="date"  name="departure-­‐date"
    placeholder="YYYY-­‐MM-­‐DD"  required
    pattern="[0-­‐9]{4}-­‐(0[1-­‐9]|1[012])-­‐(0[1-­‐9]|
    1[0-­‐9]|2[0-­‐9]|3[01])">
@shayhoweUI Design with HTML5 & CSS3
MIN, MAX, & STEP
<input  type="date"  name="departure-­‐date"
    placeholder="YYYY-­‐MM-­‐DD"  required
    pattern="[0-­‐9]{4}-­‐(0[1-­‐9]|1[012])-­‐(0[1-­‐9]|
    1[0-­‐9]|2[0-­‐9]|3[01])"  min="2012-­‐07-­‐01"  
    max="2012-­‐08-­‐31"  step="2">
@shayhoweUI Design with HTML5 & CSS3
VALIDATION
@shayhoweUI Design with HTML5 & CSS3
VALIDATION STYLES
input:required:valid  {
    background:  url("images/tick.png")  98%  50%  
        no-­‐repeat;
}
@shayhoweUI Design with HTML5 & CSS3
VALIDATION STYLES
@shayhoweUI Design with HTML5 & CSS3
INPUT STATES
input:hover  {
    border-­‐color:  #a3a3a3;
}
input:focus,  input:active  {
    border:  1px  solid  #7aa3c3;
    box-­‐shadow:
        inset  0  1px  2px  rgba(0,  0,  0,  0.0),
        0  0  0  2px  rgba(86,  145,  185,  0.2);
    outline:  none;
}
@shayhoweUI Design with HTML5 & CSS3
INPUT STATES
Default
Hover
Focus & Active
@shayhoweUI Design with HTML5 & CSS3
INPUT TRANSITIONS
input  {
    ...
    -­‐webkit-­‐transition:
        border  .2s  linear,  box-­‐shadow  .2s  linear;
    -­‐moz-­‐transition:
        border  .2s  linear,  box-­‐shadow  .2s  linear;
    -­‐ms-­‐transition:
        border  .2s  linear,  box-­‐shadow  .2s  linear;
    -­‐o-­‐transition:
        border  .2s  linear,  box-­‐shadow  .2s  linear;
    transition:
        border  .2s  linear,  box-­‐shadow  .2s  linear;
}
@shayhoweUI Design with HTML5 & CSS3
BUTTON GRADIENT
button  {
    ...
    background:  #d5d5d5;
    background:
        -­‐webkit-­‐linear-­‐gradient(top,  #fff,  #ccc);
    background:
        -­‐moz-­‐linear-­‐gradient(top,  #fff,  #ccc);
    background:
        -­‐ms-­‐linear-­‐gradient(top,  #fff,  #ccc);
    background:
        -­‐o-­‐linear-­‐gradient(top,  #fff,  #ccc);
    background:
        linear-­‐gradient(top,  #fff,  #ccc);
}
@shayhoweUI Design with HTML5 & CSS3
BUTTON GRADIENT
@shayhoweUI Design with HTML5 & CSS3
RECAP
HTML
Accessibility & Assistance
Inputs & Validation
Input Attributes
Semantics
CSS
Backgrounds
Borders
Attribute & Pseudo Selectors
Transitions
@shayhoweUI Design with HTML5 & CSS3
QUESTIONS?
Thank you!
@shayhowe
http://shayhowe.com/ui
http://learn.shayhowe.com
@shayhoweUI Design with HTML5 & CSS3

More Related Content

PDF
Quality Development with CSS3
PPTX
CSS Walktrough Internship Course
PDF
An Intro to HTML & CSS
PDF
Modular HTML, CSS, & JS Workshop
PPTX
Css 2c (2) (1) (1) (2)
PDF
Intro to HTML + CSS
PDF
Modular HTML & CSS Workshop
PDF
Doing it in style - creating beautiful sites, the web standards way / WebDD /...
Quality Development with CSS3
CSS Walktrough Internship Course
An Intro to HTML & CSS
Modular HTML, CSS, & JS Workshop
Css 2c (2) (1) (1) (2)
Intro to HTML + CSS
Modular HTML & CSS Workshop
Doing it in style - creating beautiful sites, the web standards way / WebDD /...

What's hot (19)

PDF
Prototyping w/HTML5 and CSS3
PDF
Intro to html, css & sass
PPTX
Rapid and Responsive - UX to Prototype with Bootstrap
PDF
Html5 ux london
PDF
Progressive Prototyping w/HTML5, CSS3 and jQuery
PDF
[Worskhop Summits] CSS3 Workshop
PPTX
Introduction to HTML5 and CSS3 (revised)
PPTX
About Best friends - HTML, CSS and JS
PDF
Intro to CSS
PPTX
Blog HTML example for IML 295
PDF
Fundamental CSS3
PDF
Introduction to CSS3
PPTX
Cascading Style Sheets
PDF
Layout with CSS
KEY
Joomla! Day Chicago 2011 - Templating the right way - Jonathan Shroyer
PDF
Intro to HTML 5 / CSS 3
PPTX
Presentation about html5 css3
PPTX
HTML/CSS Web Blog Example
Prototyping w/HTML5 and CSS3
Intro to html, css & sass
Rapid and Responsive - UX to Prototype with Bootstrap
Html5 ux london
Progressive Prototyping w/HTML5, CSS3 and jQuery
[Worskhop Summits] CSS3 Workshop
Introduction to HTML5 and CSS3 (revised)
About Best friends - HTML, CSS and JS
Intro to CSS
Blog HTML example for IML 295
Fundamental CSS3
Introduction to CSS3
Cascading Style Sheets
Layout with CSS
Joomla! Day Chicago 2011 - Templating the right way - Jonathan Shroyer
Intro to HTML 5 / CSS 3
Presentation about html5 css3
HTML/CSS Web Blog Example
Ad

Viewers also liked (20)

PDF
DBFluteを閉じ込めよう
PPTX
Spring starterによるSpring Boot Starter
PDF
Responsive Web Design
PDF
ヒューマンリーダブルな CSS 記述法(異次元編):2016年5月13日 CodeGrid 四周年記念パーティー
PPTX
最近誰かに「やったほうがいいよ」と伝えた7のこと
PDF
コーダー白書2016
PDF
Building Responsive Layouts
PPTX
PDF
Spring Boot + Doma + AngularJSで作るERP (LINE Fukuoka Meetup版)
PDF
Grails 3.0先取り!? Spring Boot入門ハンズオン #jggug_boot
PDF
Grailsでドメイン駆動設計を実践する時の勘所
PDF
Spring4とSpring Bootで作る次世代Springアプリケーション #jjug #jsug
PDF
コンポーネント指向と余白の設計
PDF
Spring Bootで変わる Javaアプリ開発! #jsug
PDF
Intro to CSS3
PDF
Spring Bootでチャットツールを作りながらWebの仕組みを理解しよう!
PDF
Spring Bootをはじめる時にやるべき10のこと
PDF
Spring Bootハンズオン ~Spring Bootで作る マイクロサービスアーキテクチャ! #jjug_ccc #ccc_r53
PDF
「実録!となりのJenkins2.0」 - 第7回大阪 / 第9回(東京)Jenkins勉強会 #jenkinsstudy
DBFluteを閉じ込めよう
Spring starterによるSpring Boot Starter
Responsive Web Design
ヒューマンリーダブルな CSS 記述法(異次元編):2016年5月13日 CodeGrid 四周年記念パーティー
最近誰かに「やったほうがいいよ」と伝えた7のこと
コーダー白書2016
Building Responsive Layouts
Spring Boot + Doma + AngularJSで作るERP (LINE Fukuoka Meetup版)
Grails 3.0先取り!? Spring Boot入門ハンズオン #jggug_boot
Grailsでドメイン駆動設計を実践する時の勘所
Spring4とSpring Bootで作る次世代Springアプリケーション #jjug #jsug
コンポーネント指向と余白の設計
Spring Bootで変わる Javaアプリ開発! #jsug
Intro to CSS3
Spring Bootでチャットツールを作りながらWebの仕組みを理解しよう!
Spring Bootをはじめる時にやるべき10のこと
Spring Bootハンズオン ~Spring Bootで作る マイクロサービスアーキテクチャ! #jjug_ccc #ccc_r53
「実録!となりのJenkins2.0」 - 第7回大阪 / 第9回(東京)Jenkins勉強会 #jenkinsstudy
Ad

Similar to UI Design with HTML5 & CSS3 (20)

PDF
Presentation html5 css3 by thibaut
KEY
Slow kinda sucks
PPTX
Managing responsive websites with css preprocessors.
PDF
Quality Development with HTML5
PDF
Implementing Awesome: An HTML5/CSS3 Workshop
PPTX
PPTX
HTML5 Tutorial
PDF
HTML5, the new buzzword
PDF
Rapid Prototyping
KEY
PDF
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
PPTX
Enhancing SharePoint with Responsive Web Design
PDF
GDI Seattle Intermediate HTML and CSS Class 1
PPTX
Diazo: Bridging Designers and Programmers
PDF
Modular HTML & CSS
KEY
2022 HTML5: The future is now
PPTX
PDF
Controlling Web Typography
KEY
关于 Html5 那点事
PDF
Responsive layouts by Maqbool
Presentation html5 css3 by thibaut
Slow kinda sucks
Managing responsive websites with css preprocessors.
Quality Development with HTML5
Implementing Awesome: An HTML5/CSS3 Workshop
HTML5 Tutorial
HTML5, the new buzzword
Rapid Prototyping
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Enhancing SharePoint with Responsive Web Design
GDI Seattle Intermediate HTML and CSS Class 1
Diazo: Bridging Designers and Programmers
Modular HTML & CSS
2022 HTML5: The future is now
Controlling Web Typography
关于 Html5 那点事
Responsive layouts by Maqbool

More from Shay Howe (7)

PDF
Yes, Designer, You CAN Be a Product Leader
PDF
Collaboration Practices
PDF
How Constraints Cultivate Growth
PDF
Modular HTML & CSS Turbo Workshop
PDF
HTML5 Semantics
PDF
The Web Design Process: A Strategy for Success
PDF
Writing for the Web: The Right Strategy
Yes, Designer, You CAN Be a Product Leader
Collaboration Practices
How Constraints Cultivate Growth
Modular HTML & CSS Turbo Workshop
HTML5 Semantics
The Web Design Process: A Strategy for Success
Writing for the Web: The Right Strategy

Recently uploaded (20)

PPTX
mahatma gandhi bus terminal in india Case Study.pptx
PPTX
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
PDF
YOW2022-BNE-MinimalViableArchitecture.pdf
PPTX
Fundamental Principles of Visual Graphic Design.pptx
PPTX
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
PPTX
areprosthodontics and orthodonticsa text.pptx
PDF
Phone away, tabs closed: No multitasking
PPTX
Special finishes, classification and types, explanation
PDF
Key Trends in Website Development 2025 | B3AITS - Bow & 3 Arrows IT Solutions
PPT
WHY_R12 Uaafafafpgradeaffafafafaffff.ppt
PPTX
Media And Information Literacy for Grade 12
PPTX
An introduction to AI in research and reference management
PPTX
6- Architecture design complete (1).pptx
PDF
Skskkxiixijsjsnwkwkaksixindndndjdjdjsjjssk
PPTX
CLASS_11_BUSINESS_STUDIES_PPT_CHAPTER_1_Business_Trade_Commerce.pptx
PPT
Machine printing techniques and plangi dyeing
PDF
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
PDF
Quality Control Management for RMG, Level- 4, Certificate
PPTX
Entrepreneur intro, origin, process, method
PPTX
rapid fire quiz in your house is your india.pptx
mahatma gandhi bus terminal in india Case Study.pptx
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
YOW2022-BNE-MinimalViableArchitecture.pdf
Fundamental Principles of Visual Graphic Design.pptx
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
areprosthodontics and orthodonticsa text.pptx
Phone away, tabs closed: No multitasking
Special finishes, classification and types, explanation
Key Trends in Website Development 2025 | B3AITS - Bow & 3 Arrows IT Solutions
WHY_R12 Uaafafafpgradeaffafafafaffff.ppt
Media And Information Literacy for Grade 12
An introduction to AI in research and reference management
6- Architecture design complete (1).pptx
Skskkxiixijsjsnwkwkaksixindndndjdjdjsjjssk
CLASS_11_BUSINESS_STUDIES_PPT_CHAPTER_1_Business_Trade_Commerce.pptx
Machine printing techniques and plangi dyeing
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
Quality Control Management for RMG, Level- 4, Certificate
Entrepreneur intro, origin, process, method
rapid fire quiz in your house is your india.pptx

UI Design with HTML5 & CSS3

  • 1. UI DESIGN WITH HTML5 & CSS3 Shay Howe @shayhowe www.shayhowe.com
  • 2. UI Design with HTML5 & CSS3 SHAY HOWE www.shayhowe.com – @shayhowe @shayhowe
  • 3. HTML5 & CSS3 HTML Accessibility, Audio & Video Support, Figure Elements, Forms & Validation, New Elements & Attributes, Revised Elements & Attributes, Semantics, Structural Elements, Textual Elements, & more. CSS Animations, Backgrounds, Borders, Flexible Grids, Responsive Design, Rounded Corners, Selectors, Shadows, Transforms, Transitions, Transparency, Typography, & more. @shayhoweUI Design with HTML5 & CSS3
  • 4. HTML5 & CSS3 HTML Accessibility, Audio & Video Support, Figure Elements, Forms & Validation, New Elements & Attributes, Revised Elements & Attributes, Semantics, Structural Elements, Textual Elements, & more. CSS Animations, Backgrounds, Borders, Flexible Grids, Responsive Design, Rounded Corners, Selectors, Shadows, Transforms, Transitions, Transparency, Typography, & more. @shayhoweUI Design with HTML5 & CSS3
  • 6. TOOLTIP MARKUP <p>    Beginning  of  a  general  paragraph  of  text...    <b  class="tooltip">        tooltip  to  rollover        <span>            Text  to  be  displayed  within  the  tooltip.        </span>    </b>    ...ending  of  the  paragraph. </p> @shayhoweUI Design with HTML5 & CSS3
  • 7. SHOW/HIDE TOOLTIP .tooltip  {    border-­‐bottom:  1px  solid  #aaa; } .tooltip  span  {    background:  #000;    background:  rgba(0,  0,  0,  0.8);    display:  block;    padding:  10px  12px;    opacity:  0;    width:  100% } .tooltip:hover  span  {    opacity:  1; } @shayhoweUI Design with HTML5 & CSS3
  • 8. TOOLTIP POSITION .tooltip  {    ...    position:  relative; } .tooltip  span  {    ...    bottom:  100%;    left:  -­‐12px;    position:  absolute; } @shayhoweUI Design with HTML5 & CSS3
  • 10. TOOLTIP ROUNDED CORNERS .tooltip  span  {    ...    -­‐webkit-­‐border-­‐radius:  4px;          -­‐moz-­‐border-­‐radius:  4px;            -­‐ms-­‐border-­‐radius:  4px;              -­‐o-­‐border-­‐radius:  4px;                    border-­‐radius:  4px; } @shayhoweUI Design with HTML5 & CSS3
  • 11. TOOLTIP ROUNDED CORNERS @shayhoweUI Design with HTML5 & CSS3
  • 12. TOOLTIP SHADOWS .tooltip  span  {    ...    -­‐webkit-­‐box-­‐shadow:  inset  0  1px  3px  #000;          -­‐moz-­‐box-­‐shadow:  inset  0  1px  3px  #000;            -­‐ms-­‐box-­‐shadow:  inset  0  1px  3px  #000;              -­‐o-­‐box-­‐shadow:  inset  0  1px  3px  #000;                    box-­‐shadow:  inset  0  1px  3px  #000;    text-­‐shadow:  0  1px  0  #000; } @shayhoweUI Design with HTML5 & CSS3
  • 14. TOOLTIP ARROW .tooltip  span:after  {    border-­‐left:  6px  solid  transparent;    border-­‐right:  6px  solid  transparent;    border-­‐top:  6px  solid  #000;    border-­‐top:  6px  solid  rgba(0,  0,  0,  0.8);    bottom:  -­‐6px;    content:  "";    height:  0;    left:  25%;    position:  absolute;    width:  0; } @shayhoweUI Design with HTML5 & CSS3
  • 15. TOOLTIP ARROW @shayhoweUI Design with HTML5 & CSS3
  • 16. RECAP HTML Accessibility Semantics CSS Backgrounds Box & Text Shadows Position Pseudo Selectors Rounded Corners Transparency @shayhoweUI Design with HTML5 & CSS3
  • 18. DOWNLOADS MARKUP <ul>    <li>        <a  href="files/pdf-­‐document.pdf">            PDF  Document        </a>    </li>    <li>        <a  href="files/word-­‐document.doc">            Word  Document        </a>    </li>    ... </ul> @shayhoweUI Design with HTML5 & CSS3
  • 19. DOWNLOAD ATTRIBUTE <ul>    <li>        <a  href="files/pdf-­‐document.pdf"  download>            PDF  Document        </a>    </li>    <li>        <a  href="files/word-­‐document.doc"          download="super-­‐unique-­‐file-­‐name.doc">            Word  Document        </a>    </li>    ... </ul> @shayhoweUI Design with HTML5 & CSS3
  • 20. GENERAL LIST STYLES ul  {    border-­‐top:  1px  solid  #ddd;    list-­‐style:  none; } li  {    border-­‐bottom:  1px  solid  #ddd;    padding:  10px  0; } @shayhoweUI Design with HTML5 & CSS3
  • 21. GENERAL LIST STYLES @shayhoweUI Design with HTML5 & CSS3
  • 22. ADDING ICONS li  a  {    padding:  1px  0  1px  22px; } li  a[href$=".pdf"]  {    background:  url("pdf.png")  0  50%  no-­‐repeat; } li  a[href$=".doc"]  {    background:  url("doc.png")  0  50%  no-­‐repeat; } li  a[href$=".jpg"]  {    background:  url("image.png")  0  50%  no-­‐repeat; } ... @shayhoweUI Design with HTML5 & CSS3
  • 23. ADDING ICONS @shayhoweUI Design with HTML5 & CSS3
  • 24. ADDING FILE PATHS li  a[href$=".pdf"]:after, li  a[href$=".doc"]:after, li  a[href$=".jpg"]:after, li  a[href$=".mp3"]:after, li  a[href$=".mp4"]:after  {    color:  #aaa;    content:  "  ("  attr(href)  ")";    font-­‐size:  11px; } @shayhoweUI Design with HTML5 & CSS3
  • 25. ADDING FILE PATHS @shayhoweUI Design with HTML5 & CSS3
  • 26. DOWNLOAD ATTRIBUTE SUPPORT li  a[href$=".pdf"][download]:not([download=""]):after, li  a[href$=".doc"][download]:not([download=""]):after, li  a[href$=".jpg"][download]:not([download=""]):after, li  a[href$=".mp3"][download]:not([download=""]):after, li  a[href$=".mp4"][download]:not([download=""]):after  {    content:  "  ("  attr(download)  ")"; } @shayhoweUI Design with HTML5 & CSS3
  • 27. ADDING FILE PATHS @shayhoweUI Design with HTML5 & CSS3
  • 28. GETTING RESPONSIVE @media  only  screen  and  (min-­‐width:  320px)  {    a[href$=".pdf"]:after,    a[href$=".doc"]:after,    a[href$=".jpg"]:after,    a[href$=".mp3"]:after,    a[href$=".mp4"]:after  {        color:  #aaa;        content:  "  ("  attr(href)  ")";        font-­‐size:  11px;    }    ... } @shayhoweUI Design with HTML5 & CSS3
  • 29. GOING MOBILE @shayhoweUI Design with HTML5 & CSS3
  • 30. RECAP HTML Accessibility Download Attribute Semantics CSS Responsive Design Attribute, Negation, & Pseudo Selectors @shayhoweUI Design with HTML5 & CSS3
  • 32. FORM MARKUP <form>    <label>        Departure  City        <input  type="text"  name="departure-­‐city">    </label>    <label>        Departure  Date  <span>(YYYY-­‐MM-­‐DD)</span>        <input  type="date"  name="departure-­‐date">    </label>    ...    <button>Search</button> </form> @shayhoweUI Design with HTML5 & CSS3
  • 33. FORM MARKUP @shayhoweUI Design with HTML5 & CSS3
  • 34. FORM MARKUP @shayhoweUI Design with HTML5 & CSS3
  • 35. INPUT PLACEHOLDERS <input  type="text"  name="departure-­‐city"    placeholder="City  or  Airport  Code"> <input  type="date"  name="departure-­‐date"    placeholder="YYYY-­‐MM-­‐DD"> @shayhoweUI Design with HTML5 & CSS3
  • 37. INPUT ASSISTANCE <input  type="text"  name="departure-­‐city"    placeholder="City  or  Airport  Code"      list="cities"> <datalist  id="cities">    <option  value="Boston  (BOS)">    <option  value="Chicago  (ORD)">    <option  value="New  York  (LGA)">    <option  value="San  Francisco  (SFO)">    <option  value="Seattle  (SEA)"> </datalist> @shayhoweUI Design with HTML5 & CSS3
  • 39. REQUIRED INPUTS <input  type="text"  name="departure-­‐city"    placeholder="City  or  Airport  Code"      list="cities"  required> @shayhoweUI Design with HTML5 & CSS3
  • 40. REQUIRED INPUTS <input  type="date"  name="departure-­‐date"    placeholder="YYYY-­‐MM-­‐DD"  required> @shayhoweUI Design with HTML5 & CSS3
  • 41. INPUT PATTERNS <input  type="date"  name="departure-­‐date"    placeholder="YYYY-­‐MM-­‐DD"  required    pattern="[0-­‐9]{4}-­‐(0[1-­‐9]|1[012])-­‐(0[1-­‐9]|    1[0-­‐9]|2[0-­‐9]|3[01])"> @shayhoweUI Design with HTML5 & CSS3
  • 42. MIN, MAX, & STEP <input  type="date"  name="departure-­‐date"    placeholder="YYYY-­‐MM-­‐DD"  required    pattern="[0-­‐9]{4}-­‐(0[1-­‐9]|1[012])-­‐(0[1-­‐9]|    1[0-­‐9]|2[0-­‐9]|3[01])"  min="2012-­‐07-­‐01"      max="2012-­‐08-­‐31"  step="2"> @shayhoweUI Design with HTML5 & CSS3
  • 44. VALIDATION STYLES input:required:valid  {    background:  url("images/tick.png")  98%  50%          no-­‐repeat; } @shayhoweUI Design with HTML5 & CSS3
  • 46. INPUT STATES input:hover  {    border-­‐color:  #a3a3a3; } input:focus,  input:active  {    border:  1px  solid  #7aa3c3;    box-­‐shadow:        inset  0  1px  2px  rgba(0,  0,  0,  0.0),        0  0  0  2px  rgba(86,  145,  185,  0.2);    outline:  none; } @shayhoweUI Design with HTML5 & CSS3
  • 47. INPUT STATES Default Hover Focus & Active @shayhoweUI Design with HTML5 & CSS3
  • 48. INPUT TRANSITIONS input  {    ...    -­‐webkit-­‐transition:        border  .2s  linear,  box-­‐shadow  .2s  linear;    -­‐moz-­‐transition:        border  .2s  linear,  box-­‐shadow  .2s  linear;    -­‐ms-­‐transition:        border  .2s  linear,  box-­‐shadow  .2s  linear;    -­‐o-­‐transition:        border  .2s  linear,  box-­‐shadow  .2s  linear;    transition:        border  .2s  linear,  box-­‐shadow  .2s  linear; } @shayhoweUI Design with HTML5 & CSS3
  • 49. BUTTON GRADIENT button  {    ...    background:  #d5d5d5;    background:        -­‐webkit-­‐linear-­‐gradient(top,  #fff,  #ccc);    background:        -­‐moz-­‐linear-­‐gradient(top,  #fff,  #ccc);    background:        -­‐ms-­‐linear-­‐gradient(top,  #fff,  #ccc);    background:        -­‐o-­‐linear-­‐gradient(top,  #fff,  #ccc);    background:        linear-­‐gradient(top,  #fff,  #ccc); } @shayhoweUI Design with HTML5 & CSS3
  • 51. RECAP HTML Accessibility & Assistance Inputs & Validation Input Attributes Semantics CSS Backgrounds Borders Attribute & Pseudo Selectors Transitions @shayhoweUI Design with HTML5 & CSS3