Transforms
3D Transforms
Rotate
|
|
Scale
|
|
Translate
|
|
Skew
|
|
Transformation组合
|
|
Origin
|
|
Transitions
A few thins in plcace for trasition:
1.Two styles 2. Transition property 3. A trigger
transition properties:
complete list: https://www.w3.org/TR/css3-transitions/#animatable-properties
添加 Transition
|
|
|
|
Transition Timing
|
|
Timing: http://www.the-art-of-web.com/css/timing-function/
Cubic Bezier: https://matthewlein.com/ceaser/
推迟Transition的开始
|
|
Tip:
比如在鼠标旋停弹出菜单时, 为使菜单立即出现:
比如在鼠标离开弹出菜单时, 为防止菜单立即消失:
|
|
Transition 速记法
|
|
Animations
Transition vs. Animation:
Transition: One set properties => Another
Animation: Transition + 1. repeat, 2. pause, 3. reverse
Two steps to create animation:
- Define the animation -
keyframes
- Apply the animation to an element.
定义 Keyframes
|
|
应用 Animation
Apply to normal element h1
, or with pseudo class :hover, :active, :target, :focus ...
|
|
Animation 速记法
|
|
暂停 Animation
|
|