├── 01-selectors ├── adjacent-sibling-combinator.html ├── attribute-hyphenated.html ├── attribute-selectors-substring.html ├── attribute-space-separated.html ├── child-combinator.html ├── descendant-combinator.html ├── general-sibling-combinator.html ├── index.html ├── input-pseudo-class.html ├── pseudo-class-first-last-type.html ├── pseudo-class-first-last.html ├── pseudo-class-first-of-type-first-letter.html ├── pseudo-class-not.html ├── pseudo-class-nth-child-AnB.html ├── pseudo-class-nth-child.html ├── pseudo-class-nth-last-child-AnB.html ├── pseudo-class-nth-last-of-type.html ├── pseudo-class-nth-of-type.html ├── pseudo-class-only-child.html ├── pseudo-class-target.html ├── pseudo-el-first-letter-drop.html ├── pseudo-el-first-letter-init.html ├── pseudo-el-first-line.html └── pseudo-el-selection.html ├── 04-layouts ├── box-sizing-border-box.html ├── column-span.html ├── flexbox.html ├── index.html ├── multi-column.html ├── stacking-context-menu.html ├── stacking-context-opacity.html └── stacking-context.html ├── 05-animation ├── animation │ ├── animation-direction.html │ ├── animation-events.html │ ├── animation-fill-mode.html │ ├── animation-play-state.html │ ├── percent-keyframes.html │ └── simple.html ├── index.html └── transitions │ ├── multiple-transitions.html │ ├── negative-delay.html │ ├── simple-withjs.html │ ├── simple.html │ ├── steps.html │ ├── timing-functions.html │ └── transition-end.html ├── 06-transforms ├── backface-visibility-card.html ├── backface-visibility.html ├── containing-block.html ├── index.html ├── perspective-function.html ├── perspective-origin.html ├── perspective.html ├── stacking-context.html ├── transform-origin-1.html ├── transform-perspective.html ├── transform-rotate3d-cube.html ├── transform-rotate3d.html ├── transform-rotate540.html ├── transform-rotateX.html ├── transform-rotateY.html ├── transform-rotateZ.html ├── transform-scale.html ├── transform-scale3d.html ├── transform-scaleX.html ├── transform-scaleY.html ├── transform-scaleZ.html ├── transform-skew.html ├── transform-skewX.html ├── transform-skewY.html ├── transform-style.html ├── transform-translate.html ├── transform-translate3d-cube.html └── transform-translateZ.html ├── 07-conditionalcss ├── index.html ├── media-query-discrete.html ├── media-query-events.html ├── media-query-nested.html ├── media-query-simple.html ├── supports-flexbox.html └── supports-simple.html ├── 08-svg ├── index.html ├── respond.src.js ├── svg-fragments.html ├── svg-media-queries-bg.html ├── svg-media-queries.html ├── svg-wipe-in.html └── twinkling-star.html ├── css ├── base.css ├── chapter1 │ ├── selectors-firstlast.css │ ├── selectors-input.css │ ├── selectors-not.css │ ├── selectors-nth-child.css │ └── selectors-target.css ├── chapter4 │ ├── box-sizing.css │ ├── flex.css │ ├── floats.css │ ├── menu.css │ ├── multi-col.css │ └── stacking.css ├── chapter5 │ ├── anim-play-state.css │ ├── animpctkeyframes.css │ ├── animsimple.css │ ├── multi-trans.css │ ├── negative-delay.css │ ├── simple-withjs.css │ ├── simple.css │ ├── steps.css │ ├── timing-functions.css │ └── trans-end.css ├── chapter6 │ ├── backface-vis.css │ ├── carousel.css │ ├── dice.css │ ├── persp-origin.css │ ├── perspective-func.css │ ├── rotate.css │ ├── scale.css │ ├── skew.css │ ├── stacking.css │ ├── transform-origin.css │ ├── transform-style.css │ ├── transform.css │ └── translate.css ├── chapter7 │ ├── mq.css │ └── supports.css └── chapter8 │ └── svg.css ├── images ├── Buteo_magnirostris_by_Dario_Sanches.jpg ├── awesomenews.svg ├── csscircle-blue.svg ├── csscircle-pink.svg ├── csscircle-yellow.svg ├── csscircle.svg ├── diamond.png ├── menu.svg ├── phone-icon.svg ├── portrait.png ├── svg-icons.svg ├── svgmq.svg ├── svgmqbg.svg └── tomato.png ├── index.html ├── js ├── chapter1 │ └── selectors.js ├── chapter4 │ ├── box-sizing.js │ ├── flexbox.js │ ├── muticol.js │ └── stacking.js ├── chapter5 │ ├── anim-events.js │ ├── fill-mode.js │ ├── play-pause.js │ └── stop-anim.js ├── chapter6 │ ├── backface-vis-card.js │ ├── backface-vis.js │ ├── persp-origin.js │ ├── perspective-func.js │ ├── perspective.js │ ├── rotate3d.js │ ├── rotations.js │ ├── scale.js │ ├── scale3d.js │ ├── scaleZ.js │ ├── transform-style.js │ ├── translate.js │ ├── translate3d.js │ └── translateZ.js ├── chapter8 │ └── svg.js ├── convertangles.min.js ├── css.js ├── escapereset.js └── html5shiv.min.js └── scss ├── base.scss ├── chapter1 ├── selectors-firstlast.scss ├── selectors-input.scss ├── selectors-not.scss ├── selectors-nth-child.scss └── selectors-target.scss ├── chapter4 ├── box-sizing.scss ├── flex.scss ├── floats.scss ├── menu.scss ├── multi-col.scss └── stacking.scss ├── chapter5 ├── anim-play-state.scss ├── animpctkeyframes.scss ├── animsimple.scss ├── multi-trans.scss ├── negative-delay.scss ├── simple-withjs.scss ├── simple.scss ├── steps.scss ├── timing-functions.scss └── trans-end.scss ├── chapter6 ├── backface-vis.scss ├── carousel.scss ├── dice.scss ├── persp-origin.scss ├── perspective-func.scss ├── rotate.scss ├── scale.scss ├── skew.scss ├── stacking.scss ├── transform-origin.scss ├── transform-style.scss ├── transform.scss └── translate.scss ├── chapter7 ├── mq.scss └── supports.scss ├── chapter8 └── svg.scss └── includes ├── _config.scss ├── _dice.scss ├── _layout.scss ├── _mixins.scss ├── _normalize.scss ├── _resets.scss └── _typography.scss /01-selectors/attribute-selectors-substring.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Attribute Selectors - Matching attribute value substrings (CSS Master) 7 | 8 | 9 | 10 | 26 | 27 | 28 | 29 |
30 |

CSS Master Code Examples: Attribute Selectors - Matching value substrings 31 |

32 | Back to listing 33 |
34 |
35 | 36 |

Call this business

37 | 38 |
39 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /01-selectors/attribute-space-separated.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Attribute Selectors - Space Separated Values (CSS Master) 7 | 8 | 9 | 10 | 48 | 49 | 50 | 51 |
52 |

CSS Master Code Examples: Attribute Selectors - Space Separated Values

53 | Back to listing 54 |
55 |
56 | 57 |

The links below use a space-separated rel attribute. We're using [rel~=external] to match them.

58 |

Bob

59 |

María

60 | 61 |
62 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /01-selectors/pseudo-class-first-last-type.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | :first-of-type / :last-of-type (CSS Master) 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |

CSS Master Code Examples: :first-of-type / :last-of-type

15 | Back to listing 16 |
17 | 18 |
19 |

The :first-of-type / :last-of-type pseudo-classes are intended to be used with element or type selectors.

20 |
21 | 22 |
1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19
20
23 | 24 |
25 |
26 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /01-selectors/pseudo-class-first-last.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | :first-child and :last-child (CSS Master) 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |

CSS Master Code Examples: Using :first-child and :last-child

15 | Back to listing 16 |
17 | 18 |
19 |

List of fruits

20 |

The first li element is bold and green and the last li element is italicized and hot pink. They are both children of ul. Elements that match *:first-child have a gray background.

21 | 28 | 29 |

List of auto makers

30 | 37 |
38 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /01-selectors/pseudo-class-first-of-type-first-letter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Using :first-of-type with ::first-letter (CSS Master) 7 | 8 | 9 | 10 | 21 | 22 | 23 | 24 |
25 |

CSS Master Code Examples: Using :first-of-type with ::first-letter

26 | Back to listing 27 |
28 | 29 |
30 |

Consectetur adipiscing elit headlinium

31 | 32 |

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce odio leo, sollicitudin vel mattis eget, iaculis sit amet turpis. Quisque porta suscipit erat. Nulla sit amet neque eleifend diam aliquam rhoncus. Donec id congue est. Aliquam sagittis euismod tristique. Nunc aliquet iaculis ex, rutrum interdum nulla ultricies at. Curabitur turpis est, feugiat sit amet risus quis, mollis elementum libero. Cras vitae aliquet felis. Nam efficitur semper arcu a blandit. Aliquam id turpis fringilla libero gravida malesuada. Fusce auctor tincidunt vulputate.

33 | 34 |

Proin condimentum elit sapien, ut tempor nisl porta quis. Pellentesque vel quam efficitur, pharetra urna in, suscipit tortor. Pellentesque vel nisl sed tellus eleifend efficitur. Sed imperdiet diam sem, nec sodales libero lobortis non. Nunc semper felis sem, id pharetra lacus pellentesque tempor. Ut vitae scelerisque mauris. Nunc interdum ultricies laoreet. Nam a dui luctus, egestas enim sit amet, blandit quam. Phasellus lorem libero, sollicitudin id hendrerit a, faucibus eget nisi. Nulla et suscipit felis. Phasellus auctor nisi leo, a bibendum turpis convallis nec.

35 | 36 |
37 | 38 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /01-selectors/pseudo-class-not.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | :not() selector (CSS Master) 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |

CSS Master Code Examples: :not() selector

15 | Back to listing 16 |
17 | 18 |
19 | 20 |
21 |

Join the Cool Kids Club

22 | 23 |

24 | 25 | 26 |

27 |

28 | 29 | 30 |

31 | 32 |
33 | Receive a digest? 34 |

35 | 36 | 37 | 38 | 39 | 40 |

41 |
42 | 43 |
44 |
45 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /01-selectors/pseudo-class-only-child.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | :only-child (CSS Master) 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |

CSS Master Code Examples: :only-child

15 | Back to listing 16 |
17 | 18 |
19 |

Using :only-child

20 |

Elements that match li:only-type are marked with purple text.

21 | 24 | 25 | 30 | 31 | 34 | 35 | 39 |
40 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /01-selectors/pseudo-el-first-letter-drop.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Initial Capital with ::first-letter (CSS Master) 7 | 8 | 9 | 10 | 21 | 22 | 23 | 24 |
25 |

CSS Master Code Examples: ::first-letter

26 | Back to listing 27 |
28 | 29 |
30 | 31 |

Using ::first-letter to create a drop capital

32 | 33 |

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce odio leo, sollicitudin vel mattis eget, iaculis sit amet turpis. Quisque porta suscipit erat. Nulla sit amet neque eleifend diam aliquam rhoncus. Donec id congue est. Aliquam sagittis euismod tristique. Nunc aliquet iaculis ex, rutrum interdum nulla ultricies at. Curabitur turpis est, feugiat sit amet risus quis, mollis elementum libero. Cras vitae aliquet felis. Nam efficitur semper arcu a blandit. Aliquam id turpis fringilla libero gravida malesuada. Fusce auctor tincidunt vulputate.

34 | 35 |

Proin condimentum elit sapien, ut tempor nisl porta quis. Pellentesque vel quam efficitur, pharetra urna in, suscipit tortor. Pellentesque vel nisl sed tellus eleifend efficitur. Sed imperdiet diam sem, nec sodales libero lobortis non. Nunc semper felis sem, id pharetra lacus pellentesque tempor. Ut vitae scelerisque mauris. Nunc interdum ultricies laoreet. Nam a dui luctus, egestas enim sit amet, blandit quam. Phasellus lorem libero, sollicitudin id hendrerit a, faucibus eget nisi. Nulla et suscipit felis. Phasellus auctor nisi leo, a bibendum turpis convallis nec.

36 | 37 |
38 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /01-selectors/pseudo-el-first-letter-init.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Initial Capital with ::first-letter (CSS Master) 7 | 8 | 9 | 10 | 24 | 25 | 26 | 27 |
28 |

CSS Master Code Examples: ::first-letter

29 | Back to listing 30 |
31 | 32 |
33 | 34 |

Using ::first-letter to create an initial capital

35 | 36 | 37 |

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce odio leo, sollicitudin vel mattis eget, iaculis sit amet turpis. Quisque porta suscipit erat. Nulla sit amet neque eleifend diam aliquam rhoncus. Donec id congue est. Aliquam sagittis euismod tristique. Nunc aliquet iaculis ex, rutrum interdum nulla ultricies at. Curabitur turpis est, feugiat sit amet risus quis, mollis elementum libero. Cras vitae aliquet felis. Nam efficitur semper arcu a blandit. Aliquam id turpis fringilla libero gravida malesuada. Fusce auctor tincidunt vulputate.

38 | 39 |

Proin condimentum elit sapien, ut tempor nisl porta quis. Pellentesque vel quam efficitur, pharetra urna in, suscipit tortor. Pellentesque vel nisl sed tellus eleifend efficitur. Sed imperdiet diam sem, nec sodales libero lobortis non. Nunc semper felis sem, id pharetra lacus pellentesque tempor. Ut vitae scelerisque mauris. Nunc interdum ultricies laoreet. Nam a dui luctus, egestas enim sit amet, blandit quam. Phasellus lorem libero, sollicitudin id hendrerit a, faucibus eget nisi. Nulla et suscipit felis. Phasellus auctor nisi leo, a bibendum turpis convallis nec.

40 | 41 |
42 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /01-selectors/pseudo-el-first-line.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Using ::first-line (CSS Master) 7 | 8 | 9 | 10 | 19 | 20 | 21 | 22 |
23 |

CSS Master Code Examples: ::first-line

24 | Back to listing 25 |
26 | 27 |
28 | 29 |

Using ::first-line

30 | 31 |

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusceodio leo, sollicitudin vel mattis eget, iaculis sit amet turpis. Quisque porta suscipit erat. Nulla sit amet neque eleifend diam aliquam rhoncus. Donec id congue est. Aliquam sagittis euismod tristique. Nunc aliquet iaculis ex, rutrum interdum nulla ultricies at. Curabitur turpis est, feugiat sit amet risus quis, mollis elementum libero. Cras vitae aliquet felis. Nam efficitur semper arcu a blandit. Aliquam id turpis fringilla libero gravida malesuada. Fusce auctor tincidunt vulputate.

32 | 33 |

Proin condimentum elit sapien, ut tempor nisl porta quis. Pellentesque vel quam efficitur, pharetra urna in, suscipit tortor. Pellentesque vel nisl sed tellus eleifend efficitur. Sed imperdiet diam sem, nec sodales libero lobortis non. Nunc semper felis sem, id pharetra lacus pellentesque tempor. Ut vitae scelerisque mauris. Nunc interdum ultricies laoreet. Nam a dui luctus, egestas enim sit amet, blandit quam. Phasellus lorem libero, sollicitudin id hendrerit a, faucibus eget nisi. Nulla et suscipit felis. Phasellus auctor nisi leo, a bibendum turpis convallis nec.

34 |
35 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /01-selectors/pseudo-el-selection.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Using ::selection pseudo-element (CSS Master) 7 | 8 | 9 | 10 | 22 | 23 | 24 | 25 |
26 |

CSS Master Code Examples: ::selection

27 | Back to listing 28 |
29 | 30 |
31 | 32 |

Using ::selection

33 |

Select some page text using your mouse.

34 | 35 |

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusceodio leo, sollicitudin vel mattis eget, iaculis sit amet turpis. Quisque porta suscipit erat. 36 | Nulla sit amet neque eleifend diam aliquam rhoncus. Donec id congue est. Aliquam sagittis euismod tristique. Nunc aliquet iaculis ex, rutrum interdum nulla ultricies at. Curabitur turpis est, feugiat sit amet risus quis, mollis elementum libero. Cras vitae aliquet felis. Nam efficitur semper arcu a blandit. Aliquam id turpis fringilla libero gravida malesuada. Fusce auctor tincidunt vulputate.

37 | 38 |

Proin condimentum elit sapien, ut tempor nisl porta quis. Pellentesque vel quam efficitur, pharetra urna in, suscipit tortor. Pellentesque vel nisl sed tellus eleifend efficitur. Sed imperdiet diam sem, nec sodales libero lobortis non. Nunc semper felis sem, id pharetra lacus pellentesque tempor. Ut vitae scelerisque mauris. Nunc interdum ultricies laoreet. Nam a dui luctus, egestas enim sit amet, blandit quam. Phasellus lorem libero, sollicitudin id hendrerit a, faucibus eget nisi. Nulla et suscipit felis. Phasellus auctor nisi leo, a bibendum turpis convallis nec.

39 |
40 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /04-layouts/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 4 Complex Layouts 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |

CSS Master Code Examples: Chapter 4

17 | Back to listing 18 |
19 | 20 | 32 | 33 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /04-layouts/stacking-context-opacity.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Stacking context and opacity (CSS Master) 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 |
21 |

CSS Master Code Examples: Chapter 6

22 | Back to listing 23 |
24 | 25 |
26 | 27 |

Opacity and stacking context

28 |

Toggle the control above to switch the opacity of div#f between 0.99 and 1. The black backgrounded paragraph is a child of div#f with z-index: 1 applied.

29 | 30 |
31 |

1
32 |

33 |
34 | 35 |
36 |
37 |

div#f

38 |
39 | 40 |
41 |

div#g

42 |
43 |
44 | 45 |

opacity values less than 1 create a local stacking context. Child elements are stacked within their parent. Elements in other stacking contexts can't (and won't) be stacked in between a child layer and its parent layer. opacity is not the only property that can trigger a local stacking context. Other properties include transform and filter when the value is something besides none

46 | 47 | 48 | 49 |
50 | 51 | 52 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /04-layouts/stacking-context.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 6 - transform and stacking context 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |

CSS Master Code Examples: Chapter 6

17 | Back to listing 18 |
19 | 20 |
21 | 22 |

Stacking context

23 | 24 |
25 |
26 |

div#a

27 |
28 | 29 |
30 |

div#b

31 |
32 |
33 |

div#c

34 |
35 |
36 |

div#d

37 |
38 |
39 |

div#e

40 |
41 |
42 |
43 | 44 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /05-animation/animation/animation-events.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 5 - Animation events 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |

CSS Master Code Examples: Chapter 5

17 | Back to listing 18 |
19 | 20 |
21 |

Detecting animation events

22 |

Click the button below to start the animation. The animation will run 5 times. Whenever an event fires, the Event list panel will update with the name of the animation that ended (wobble), and the event type.

23 | 24 |
25 |
26 |
27 |

28 | 29 | 30 |

31 |
32 |
33 | 34 |
35 |
36 | 37 |
38 |

Event list

39 |

40 |                 
41 |
42 |
43 | 44 | 45 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /05-animation/animation/animation-play-state.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 5 - animation-play-state 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |

CSS Master Code Examples: Chapter 5

17 | Back to listing 18 |
19 | 20 |
21 |

The animation-play-state property

22 |

Click the button below to toggle between the running and paused states.

23 |
24 |

25 | 26 |

27 | 28 |
29 | 30 |
31 |
32 | 33 |
34 | 35 | 36 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /05-animation/animation/percent-keyframes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 5 - Percentage keyframes 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |

CSS Master Code Examples: Chapter 5

17 | Back to listing 18 |
19 | 20 |
21 |

Using percentage keyframes

22 | 23 |
24 |

25 | 26 |

27 | 28 |
29 | 30 |
31 | 32 |
33 | 34 |
35 | 36 | 37 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /05-animation/animation/simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 5 - Simple Transition 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |

CSS Master Code Examples: Chapter 5

17 | Back to listing 18 |
19 | 20 |
21 |

Simple animation

22 | 23 |
24 | 25 |
26 |
30 |
33 |

34 | 35 |

36 |
37 | 38 | 39 | 40 |
41 | 42 | 43 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /05-animation/transitions/multiple-transitions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 5 - Multiple Transitions 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |

CSS Master Code Examples: Chapter 5

17 | Back to listing 18 |
19 | 20 |
21 |

Multiple Transitions

22 |

Click to the transition.

23 |
24 |
25 | 26 | 31 | 32 | 33 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /05-animation/transitions/negative-delay.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 5 - Negative delay 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |

CSS Master Code Examples: Chapter 5

17 | Back to listing 18 |
19 | 20 |
21 |

Negative transition-delay

22 |

Click to transitions.

23 | 24 |
25 |

transition-delay: 0s

26 |
27 |
28 | 29 |
30 |

transition-delay: -1s

31 |
32 |
33 | 34 |

Click to transitions.

35 |
36 | 37 | 38 | 43 | 44 | 45 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /05-animation/transitions/simple-withjs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 5 - Simple Transition 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |

CSS Master Code Examples: Chapter 5

17 | Back to listing 18 |
19 | 20 |
21 |

Transition example with a JavaScript Trigger

22 |

23 |

This transition effect will take five seconds to complete after the button is clicked.

24 |
25 | 26 | 27 | 32 | 33 | 34 | 35 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /05-animation/transitions/simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 5 - Simple Transition 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |

CSS Master Code Examples: Chapter 5

17 | Back to listing 18 |
19 | 20 |
21 |

Mouse over this link to see the transition effect.

22 |
23 | 24 | 25 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /05-animation/transitions/steps.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 5 - Simple Transition 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |

CSS Master Code Examples: Chapter 5

17 | Back to listing 18 |
19 | 20 |
21 |

Step transition example

22 |

This transition effect will take five seconds to complete after the button is clicked.

23 |
24 | 25 | 26 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /06-transforms/backface-visibility-card.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 6 - perspective property 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |

CSS Master Code Examples: Chapter 6

17 | Back to listing 18 |
19 | 20 |
21 |

How the backface-visibility property works

22 | 23 |

Click the button below flip the cards. The card on the left has backface-visibility: none applied.

24 | 25 |

26 | 27 |

28 | 29 | 30 |
31 | 32 |
33 | 34 |
35 |
36 |

37 |
38 |
39 |
40 |
41 | 42 |
43 |
44 |
45 |

46 |
47 | 48 |
49 |
50 |
51 | 52 | 53 |
54 | 55 | 60 | 61 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /06-transforms/containing-block.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 6 - transform-origin 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |

CSS Master Code Examples: Chapter 6

17 | Back to listing 18 |
19 | 20 |
21 |

transform property: Containing block

22 |

When the transform property has a value other than none, positioned children are offset relative to transformed parent rather than the root element.

23 | 24 |

25 |
26 |

This is an absolutely positioned child element.

27 |
28 | 29 |
30 | 31 | 32 | 37 | 38 | 39 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /06-transforms/perspective-function.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 6 - perspective function 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |

CSS Master Code Examples: Chapter 6

19 | Back to listing 20 |
21 | 22 |
23 |

Perspective function demo

24 |

This function controls the amount of foreshortening that occurs when an object is tilted towards the viewer. The lower the value, the more severe the foreshortening. The ends of objects that are closer to the viewer will appear larger than those further away from the viewer.

25 | 26 |
27 |

28 | 29 |

30 |

31 | 32 | 33 |

34 | 35 |
36 | 37 | 38 |
39 |
40 |
41 | 42 |
43 | 44 | 49 | 50 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /06-transforms/perspective.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 6 - perspective property 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |

CSS Master Code Examples: Chapter 6

19 | Back to listing 20 |
21 | 22 |
23 |

24 | perspective: none 25 |

26 | 27 |

Adjust the slider to adjust the perspective of the stage.

28 | 29 |
30 |
31 | 0 32 | 33 | 2000px 34 | 35 |
36 | 37 |
38 | 48 |
49 | 50 | 55 | 56 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /06-transforms/transform-rotate540.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 6 - rotate transition 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |

CSS Master Code Examples: Chapter 6

17 | Back to listing 18 |
19 | 20 |
21 |

transform: rotate(540deg)

22 | 23 |

 a 540 degree rotation

24 | 25 | 26 | 27 |
28 | 29 | 30 | 35 | 36 | 37 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /06-transforms/transform-rotateX.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 6 - rotateX 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |

CSS Master Code Examples: Chapter 6

19 | Back to listing 20 |
21 | 22 |
23 |

transform: rotateX(0deg)

24 | 25 |
26 |

Adjust the slider to rotate the object below. ( 27 | 28 | ) 29 |

30 | 31 |
32 | -360 33 | 34 | 360 35 |
36 |
37 | 38 |
39 |
Unit conversions:
40 |
0rad
41 |
0grad
42 |
0turn
43 |
44 |
45 | 46 | 47 | 52 | 53 | 54 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /06-transforms/transform-rotateY.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 6 - rotateY 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |

CSS Master Code Examples: Chapter 6

19 | Back to listing 20 |
21 | 22 |
23 |

transform: rotateY(0deg)

24 | 25 |
26 |

Adjust the slider to rotate the object below. ( 27 | 28 | ) 29 |

30 | 31 |
32 | -360 33 | 34 | 360 35 |
36 |
37 | 38 | 39 | 40 |
41 |
Unit conversions:
42 |
0rad
43 |
0grad
44 |
0turn
45 |
46 |
47 | 48 | 49 | 54 | 55 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /06-transforms/transform-rotateZ.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 6 - transform-origin 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |

CSS Master Code Examples: Chapter 6

19 | Back to listing 20 |
21 | 22 |
23 |

transform: rotate(0deg)

24 |

rotate and rotateZ work the same way.

25 |

Adjust the slider to rotate the object below.

26 | 27 | 28 |
29 | -360 30 | 31 | 360 32 |
33 | 34 | 35 | 36 |
37 |
Unit conversions:
38 |
0rad
39 |
0grad
40 |
0turn
41 |
42 |
43 | 44 | 45 | 50 | 51 | 52 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /06-transforms/transform-scale.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 6 - transforms 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |

CSS Master Code Examples: Chapter 6

19 | Back to listing 20 |
21 | 22 |
23 |

transform: scale(1, 1)

24 | 25 |

Adjust the slider to scale the object below. Although values here are the same, we can adjust each independently. Also, scale(2,2) is the same as scale(2).

26 | 27 |
28 | 0 29 | 30 | 2 31 |
32 | 33 | 34 |
35 | 36 | 37 | 42 | 43 | 44 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /06-transforms/transform-scaleX.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 6 - scaleX 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |

CSS Master Code Examples: Chapter 6

19 | Back to listing 20 |
21 | 22 |
23 |

transform: scaleX(1)

24 | 25 |

Adjust the slider to scale the object below.

26 | 27 |
28 | 0 29 | 30 | 2 31 |
32 | 33 |
34 | 35 | 36 | 41 | 42 | 43 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /06-transforms/transform-scaleY.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 6 - scaleY 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |

CSS Master Code Examples: Chapter 6

19 | Back to listing 20 |
21 | 22 |
23 |

transform: scaleY(1)

24 | 25 |

Adjust the slider to scale the object below.

26 | 27 |
28 | 0 29 | 30 | 2 31 |
32 | 33 |
34 | 35 | 36 | 41 | 42 | 43 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /06-transforms/transform-skew.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 6 - skew 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |

CSS Master Code Examples: Chapter 6

19 | Back to listing 20 |
21 | 22 |
23 |

transform: skew(0deg, 0deg)

24 | 25 |

Adjust the slider to skew the object below. Though values are linked for this demo, it's perfectly okay to have different values for the x and y arguments

26 | 27 |
28 | -360 29 | 30 | 360 31 |
32 | 33 | 34 | 35 |
36 |

0rad

37 |

0grad

38 |
39 |
40 | 41 | 42 | 47 | 48 | 49 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /06-transforms/transform-skewX.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 6 - skewX 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |

CSS Master Code Examples: Chapter 6

19 | Back to listing 20 |
21 | 22 |
23 |

transform: skewX(0deg)

24 | 25 |

Adjust the slider to skew the object below.

26 | 27 |
28 | -360 29 | 30 | 360 31 |
32 | 33 | 34 | 35 |
36 |

0rad

37 |

0grad

38 |
39 |
40 | 41 | 42 | 47 | 48 | 49 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /06-transforms/transform-skewY.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 6 - skewX 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |

CSS Master Code Examples: Chapter 6

19 | Back to listing 20 |
21 | 22 |
23 |

transform: skewY(0deg)

24 | 25 |

Adjust the slider to skew the object below.

26 | 27 |
28 | -360 29 | 30 | 360 31 |
32 | 33 | 34 | 35 |
36 |

0rad

37 |

0grad

38 |
39 |
40 | 41 | 42 | 47 | 48 | 49 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /06-transforms/transform-translate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 6 - translate 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |

CSS Master Code Examples: Chapter 6

19 | Back to listing 20 |
21 | 22 |
23 |

24 | transform: translate(0, 0) 25 |

26 | 27 |

Adjust the slider to translate the object below. Translations are relative to the element's starting position.

28 | 29 |
30 |
31 | 32 | -500px 33 | 34 | 500px 35 |
36 | 37 |
38 | 39 | -500px 40 | 41 | 500px 42 |
43 |

44 |
45 | 46 | 47 |
48 | 49 | 50 | 55 | 56 | 57 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /07-conditionalcss/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CSS Master: Chapter 7 - Media Query Events 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |

CSS Master Code Examples: Chapter 7

17 | Back to listing 18 |
19 | 20 |