Skip to content

Commit fbcd518

Browse files
committed
Transform, Transition and Animation - Delay, Shorthand, All Properties
1 parent 674ab62 commit fbcd518

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

styles.css

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
transition: change over time
3-
transition-property:
4-
transition-duration:
3+
transition-delay:
4+
shorthand
55
*/
66

77
div {
@@ -10,27 +10,30 @@ div {
1010
display: inline-block;
1111
}
1212

13-
div:hover {
14-
background: chartreuse;
15-
}
16-
1713
.one {
1814
background: red;
1915
}
2016

2117
.two {
2218
background: blue;
23-
transition-property: background, border-radius;
19+
/* transition-property: background, border-radius;
20+
transition-duration: 4s, 2s; */
2421

25-
/* 4s for all transition-properties*/
26-
/* transition-duration: 4s; */
22+
/* transition delay */
23+
/* transition-delay: 2s; */
2724

28-
/* 4s for background, 2s for border-radius */
29-
transition-duration: 4s, 2s;
25+
/* Transition shorthand for specific*/
26+
/* transition: background 4s 2s, border-radius 2s 1s; */
27+
28+
/* Transition shorthand for all */
29+
transition: all 2s 1s;
3030
}
3131

3232
.two:hover {
33+
background: chartreuse;
3334
border-radius: 50%;
35+
transform: scale(2, 2);
36+
margin-top: 50%;
3437
}
3538

3639
.three {

0 commit comments

Comments
 (0)