Skip to content

Commit 4d175e2

Browse files
adding transitions version
1 parent de13d9a commit 4d175e2

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This repository contains examples of CSS usage.
44

5-
The "animation-frames-timing-function" directory contains a simple example that demonstrates the difference between the step() timing function available for CSS animations and transitions, and the new frames() timing function. [Run the example live](http://mdn.github.io/css-examples/animation-frames-timing-function/).
5+
The "animation-frames-timing-function" directory contains a simple example that demonstrates the difference between the step() timing function available for CSS animations and transitions, and the new frames() timing function. [Run the example live](http://mdn.github.io/css-examples/animation-frames-timing-function/). You can also find a version that shows the [same timing function used with transitions](http://mdn.github.io/css-examples/animation-frames-timing-function/index-transitions.html).
66

77
The "counter-style-demo" directory contains a demo for the [@counter-style documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/@counter-style). See the live demo [here](https://mdn.github.io/css-examples/counter-style-demo/).
88

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>transition-timing-function frames example</title>
6+
<style>
7+
body {
8+
margin: 0;
9+
}
10+
div {
11+
position: relative;
12+
width: 10%;
13+
height: 200px;
14+
background: red;
15+
transition-property: all;
16+
transition-duration: 5s;
17+
transition-iteration-count: infinite;
18+
}
19+
20+
p {
21+
position: absolute;
22+
width: 250px;
23+
top: 10px;
24+
left: 10px;
25+
color: white;
26+
}
27+
28+
.div1 {
29+
transition-timing-function: frames(10);
30+
}
31+
32+
.div2 {
33+
transition-timing-function: steps(10);
34+
}
35+
36+
.div3 {
37+
transition-timing-function: ease-in;
38+
}
39+
40+
div:hover {
41+
width: 100%;
42+
background: blue;
43+
}
44+
</style>
45+
</head>
46+
<body>
47+
<div class="div1"><p>transition-timing-function: frames(10)<p></div>
48+
<div class="div2"><p>transition-timing-function: steps(10);<p></div>
49+
<div class="div3"><p>transition-timing-function: ease-in;<p></div>
50+
</body>
51+
</html>

0 commit comments

Comments
 (0)