css3 new properties€¦ · transition (1) allows you to change property values smoothly over a...

24
CSS3 new properties 1 http://www.w3schools.com/cssref

Upload: others

Post on 15-Jun-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

CSS3 new properties

1

http://www.w3schools.com/cssref

Page 2: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

shadows

2

Page 3: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

3

box-shadow

The box-shadow property attaches one or more shadows to an element.

TRY IT!

Page 4: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

4

text-shadow

The text-shadow property adds shadow to text.

TRY IT!

Page 5: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

gradient

5

Page 6: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

6

gradient (1)

• Linear Gradients (goes down/up/left/right/diagonally) • Radial Gradients (defined by their center)

Page 7: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

7

gradient (2)

Page 9: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

transform

9

Page 11: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

11

transform (2) VIEW ALL

3D rotations!

Page 12: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

12

transform (3) VIEW ALL

what is missing? Perspective!

The perspective property defines how many pixels a 3D element is placed from the view. This property allows you to change the perspective on how 3D

elements are viewed.

N.B. When defining the perspective property for an element, it is the CHILD elements that get the perspective view, NOT the element itself.

Page 13: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

13

transform (4) VIEW ALL

3D rotation without perspective 3D rotation with perspective

Wow!! much better!

Page 14: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

transitions

14

Page 15: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

15

transition (1)

allows you to change property values smoothly over a given duration.

The transition effect will start when the specified CSS property changes value.

VIEW ALL

this will change the width value on mouseover

However, it is not a nice effect!

Page 16: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

16

transition (2)

we need to add a transition!

VIEW ALL

Page 17: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

17

transition (3) VIEW ALL

Page 18: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

18

transition (4) VIEW ALL

properties can be specified one by one

shorthand

Page 19: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

19

transition (5) VIEW ALL

example (ese2)

Page 20: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

20

transition (6) VIEW ALL

cooler example! (ese3)

Page 21: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

21

transition (7) VIEW ALL

result

Page 22: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

animations

22

Page 23: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

23

animation (1)

An animation lets an element gradually change from one style to another.

To use CSS3 animation, you must first specify some keyframes for the animation. Keyframes hold what styles the element will have at certain times.

VIEW ALL

ese4

Page 24: CSS3 new properties€¦ · transition (1) allows you to change property values smoothly over a given duration. The transition effect will start when the specified CSS property

24

animation (2) VIEW ALL