-
Notifications
You must be signed in to change notification settings - Fork 338
Expand file tree
/
Copy pathindex.html
More file actions
92 lines (75 loc) · 4.06 KB
/
Copy pathindex.html
File metadata and controls
92 lines (75 loc) · 4.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
layout: single
property_name: animation-play-state
---
<section id="animation-play-state" class="property">
<header class="property-header">
<nav class="property-links">
<a class="property-collection" href="{{site.url}}/animations/">
In collection: <strong>animations</strong>
</a>
<a class="property-links-direct" href="{{site.url}}/property/animation-play-state/" data-property-name="animation-play-state" data-tooltip="Single page for this property">Permalink</a>
<a class="property-share" data-tooltip="Share on Twitter or Facebook" data-property-name="animation-play-state">Share</a>
<a target="_blank" href="http://caniuse.com/#feat=css-animation" data-tooltip="See on Can I use..." rel="external">Can I use</a>
<a target="_blank" href="https://developer.mozilla.org/en/docs/Web/CSS/animation-play-state" data-tooltip="See on Mozilla Developer Network" rel="external">MDN</a>
</nav>
<h2 class="property-name">
<a href="#animation-play-state"><span>#</span>animation-play-state</a>
</h2>
<div class="property-description">
<p>Defines if an animation is playing or not.</p>
</div>
<div class="property-animation">
<a class="button property-animation-toggle" data-property-name="animation-play-state"></a>
</div>
</header>
<style type="text/css">.animation-play-state { animation-duration: 2s;animation-iteration-count: infinite; }</style>
<style type="text/css">.animation-play-state.is-animated { animation-name: fadeAndMove; }</style>
<section class="example">
<header class="example-header">
<p class="example-name">
<code class="example-default" data-tooltip="This is the property's default value">default</code>
<code class="example-value" data-tooltip="Click to copy" data-clipboard-text="animation-play-state: running;">animation-play-state: running;</code>
</p>
<div class="example-description">
<p>If the <code>animation-duration</code> and <code>animation-name</code> are defined, the animation will start playing automatically.</p>
</div>
</header>
<aside class="example-preview">
<div class="example-browser"><i></i><i></i><i></i></div>
<div class="example-output">
<div class="example-output-div animation-play-state square square--plum" id="animation-play-state-running">Hello<br>World</div>
</div>
</aside>
<style type="text/css">#animation-play-state-running{ animation-play-state:running;}</style>
</section>
<section class="example">
<header class="example-header">
<p class="example-name">
<code class="example-value" data-tooltip="Click to copy" data-clipboard-text="animation-play-state: paused;">animation-play-state: paused;</code>
</p>
<div class="example-description">
<p>The animation is set paused at the <strong>first keyframe</strong>.</p>
<p>This is different than having either no <code>animation-duration</code> or <code>animation-name</code> at all. If the animation is paused, the style applied is that of the <em>first</em> keyframe, and <strong>not</strong> the default style.</p>
<p>In this example, the square is visible by default, but the on the first keyframe of <code>fadeAndMove</code>, the <code>opacity</code> is set to <code>0</code>. When paused, the animation will be "stuck" on this first keyframe, and will thus be invisible.</p>
<p><pre>@keyframes fadeAndMove {
from {
opacity: 0;
transform: translateX(0);
}
to {
opacity: 0;
transform: translateX(100px);
}
}</pre></p>
</div>
</header>
<aside class="example-preview">
<div class="example-browser"><i></i><i></i><i></i></div>
<div class="example-output">
<div class="example-output-div animation-play-state square square--plum" id="animation-play-state-paused">Hello<br>World</div>
</div>
</aside>
<style type="text/css">#animation-play-state-paused{ animation-play-state:paused;}</style>
</section>
</section>