2. SHAY HOWE
www.shayhowe.com – @letscounthedays
Quality Development with HTML5 & CSS3 @letscounthedays
3. HTML5 CSS3
Markup language to give Presentation language to
content structure and give content style and
meaning. appearance.
Quality Development with HTML5 & CSS3 @letscounthedays
7. VENDOR PREFIXES
Chrome Opera
-‐chrome-‐ -‐o-‐
Microsoft Webkit
-‐ms-‐ -‐webkit-‐
Mozilla
-‐moz-‐
Quality Development with HTML5 & CSS3 @letscounthedays
10. ATTRIBUTE
a[target]
{
...
}
Elements with the attribute
a[src="http://www.shayhowe.com/"]
{
...
}
Elements with the attribute value
a[src*="shayhowe"]
{
...
}
Elements with an attribute value containing...
a[src^="https"]
{
...
}
Elements with an attribute value starting with...
a[src$=".pdf"]
{
...
}
Elements with an attribute value ending with...
Quality Development with HTML5 & CSS3 @letscounthedays
12. ELEMENT PSEUDO-CLASSES
input[type="text"]:enabled
{
...
}
Enabled input
input[type="text"]:disabled
{
...
}
Disabled input
input:checked
{
...
}
Checked input
Quality Development with HTML5 & CSS3 @letscounthedays
13. STRUCTURAL PSEUDO-CLASSES
:nth-‐child(3)
{
...
}
Third child element
:nth-‐child(odd)
{
...
}
Odd child elements (1, 3, 5 ...)
:nth-‐child(even)
{
...
}
Even child elements (2, 4, 6 ...)
:nth-‐child(3n)
{
...
}
Child elements with a multiple of 3 (3, 6, 9 ...)
:nth-‐child(3n+11)
{
...
}
Child elements with a multiple of 3 starting at 11 (11, 14, 17 ...)
Quality Development with HTML5 & CSS3 @letscounthedays
14. STRUCTURAL PSEUDO-CLASSES
:nth-‐child(-‐n+3)
{
...
}
First 3 child elements
:nth-‐last-‐child(-‐n+3)
{
...
}
Last 3 child elements
:not(:first-‐of-‐type):not(:last-‐of-‐type)
{
...
}
All elements but the first and last elements
Quality Development with HTML5 & CSS3 @letscounthedays
15. STRUCTURAL PSEUDO-CLASSES
:nth-‐last-‐child(3)
{
...
}
Third to last child element
:first-‐child
{
...
}
Last child element (also works with :last-‐child)
:nth-‐of-‐type(3)
{
...
}
Third child element of this type of element
:nth-‐last-‐of-‐type(3)
{
...
}
Third to last child element of this type of element
:first-‐of-‐type
{
...
}
First child element of this type of element (also works with :last-‐of-‐type)
Quality Development with HTML5 & CSS3 @letscounthedays
16. STRUCTURAL PSEUDO-CLASSES
:only-‐child
{
...
}
Only child element
:only-‐of-‐type
{
...
}
Only child element of this type of element
:empty
{
...
}
Empty element (<p></p>)
:not(p)
{
...
}
Anything but this type of element
Quality Development with HTML5 & CSS3 @letscounthedays
17. TEXTURAL PSEUDO-CLASSES
:first-‐letter
{
...
}
First letter within the element
:first-‐line
{
...
}
First line within the element
:before
{
...
}
Add content before an element
:after
{
...
}
Add content after an element
::selection
{
...
}
Selected or highlighted element
Quality Development with HTML5 & CSS3 @letscounthedays
66. SCREEN SIZE
<link
rel="stylesheet"
media="screen
and
(min-‐width:
960px)"
href="960.css">
@media
screen
and
(min-‐width:
960px)
{
...
}
Quality Development with HTML5 & CSS3 @letscounthedays
67. ORIENTATION
@media
screen
and
(min-‐width:
960px)
and
(orientation:
portrait),
screen
and
(min-‐
width:
480px)
and
(orientation:
landscape)
{
...
}
Quality Development with HTML5 & CSS3 @letscounthedays
68. MEDIA QUERIES
• aspect-‐ratio
• color
• device-‐aspect-‐ratio
• device-‐height
• device-‐width
• height
• max-‐height
• max-‐width
• monochrome
• orientation
• resolution
• width
Quality Development with HTML5 & CSS3 @letscounthedays
69. QUESTIONS?
Thank you!
Quality Development with HTML5 & CSS3 @letscounthedays