-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path30.html
2138 lines (1818 loc) · 55.4 KB
/
30.html
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Transitions & Animations</title>
<!--
Author: Estelle Weyl
Contact: estelle @ weyl dot ORG
Twitter: @estellevw
Repo: http://estelle.github.io
-->
<link href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="static/screen.css" media="projection, screen"/>
<style>
.deprecated dt {
font-weight: bold;
margin-top: 0.5rem;
outline: red solid 1px;
background-color: rgba(255,255,255,0.9);
display: inline-block;
clear: both;
}
.deprecated.listed.wide dt {
width: 100%;
}
.deprecated.listed dt {
margin-bottom: 0;
margin-top: 0.5rem;
display: block;
width: 50%;
padding-left: 5px;
}
.deprecated dd {
font-weight: normal;
margin: 0 0 2px 0;
}
.deprecated dd {display: none;}
.deprecated dt:hover + dd {display: inherit;}
/* Transform example */
#ABTrasform li {
float: left;
clear: both;
list-style-type: none;
width: 100%;
}
.y {
float: left;
line-height: 1.62em;
}
.x {
width: 75%;
float: right;
margin: 0;
position: relative;
}
.objectlink {padding-right: 30px;}
.h1 {font-size: 80px;}
.hoverme {color: red; text-decoration:underline;}
.hoverme:hover {color: yellow;}
.simptrans {transition:1s;}
/*.simptrans:hover {transition:10s}*/
.code {
color: black;
font-size: 85%;
background-color: rgba(255,255,255,0.4);
transition: all 2s ease-in 50ms;
}
.code:hover {
color: red;
background-color: rgba(255,255,255,0.9);
}
.code:not(.code2):hover {
font-size: 120%;
}
.code2:hover {
transform: scale(1.4);
transform-origin: top left;
}
.yes, .no {
position: relative;
}
.yes:after, .no:after {
content: '✓';
color:green;
font-size:60px;
position:absolute;
top: 5px;
right: 5px;
}
.no:after {
content: 'X';
color: red;
font-family: "Comic Sans MS", cursive;
}
.columns {column-count:3;
column-gap: 0.1em;}
.spinbox, .pencil {
position:relative;
font-size: 100px;
color:red;
display:block;
height: 140px;
width: 140px;
margin:10px auto;
font-size: 140px;
text-align:center;
}
.pencil, .pencil2 {
display: block;
text-align: left;
margin: 10px 0;
line-height: 140px;
position: absolute;
top: 0; left: 0;
transition: all 1s ease-in 50ms;
transform-origin: 100px 123px;
}
.outlined:hover {outline: 5px solid green;}
.spinbox .dot {
position: absolute;
top: 123px;
left: 100px;
height:5px; width: 5px;
border-radius: 0.5em}
.spinbox:hover .dot {
background-color:green;
}
.spin:hover {
transform: rotate(360deg) scale(2);
}
.pencil_01 {animation: writing 3s infinite 1s; animation-play-state:paused;}
.pencil_03 {animation: writingDangerously 3s infinite linear; animation-play-state:paused;}
.pencil_04 {animation: W 3s infinite linear; animation-play-state:paused;}
.pencil_05 {animation: gettingThePencil 3s infinite; animation-play-state:paused;}
.to {transform-origin: left 300px;}
.slide:hover .pencil_01,
.slide:hover .pencil_03,
.slide:hover .pencil_04,
.slide:hover .pencil_05,
.slide:hover .pencil_06,
.slide:hover .pencil_07,
.slide:hover .pencilanim_01
{animation-play-state:running;}
.pencil_pausing {
left: 350px;
transform-origin: center 300px;
animation: writingInCircles 3s linear infinite;
}
.pencil_pausing:hover {
animation-play-state:paused;
}
@keyframes writingInCircles {
100% {
transform:
rotate(360deg);
}
}
@keyframes writing {
0% {
left: 0;
}
100% {
left: 100%;
}
}
@keyframes writingDangerously {
0% {
left: 0;
}
10% {
left: 45%;
}
90% {
left: 55%;
}
100% {
left: 100%;
}
}
@keyframes W {
0% {
left: 0;
top: 0;
}
25% {
top: 400px;
}
50% {
top: 50px;
}
75% {
top: 400px;
}
100% {
left: 80%;
top: 0;
}
}
@keyframes gettingThePencil {
0%{
transform:
translate3d(0, 0, 0) rotate(0deg) scale(0.5, 0.5);
}
100% {
transform:
translate3d(600px, 400px, 0) rotate(80deg) scale(1.2, 1.2);
}
}
@keyframes drawALine {
0%{
width:0;
color:green;
}
100% {
width: 100%;
color:blue;
}
}
.slide nav {
float: left; width: 100%; margin-bottom: 20px;
}
.slide nav ul,.slide nav ul li {margin: 0; padding: 0;}
.slide nav + pre {clear: both; margin-top: 100px;}
.slide nav ul li {list-style-type: none; background-color: red; color: white; margin:0; padding: 3px 5px; border: 1px solid #fff;}
nav > ul > li {display: inline-block; position:relative; float: left; min-width: 120px;}
nav ul ul {
transform: scale(1,0);
transform-origin: top center;
transition:0.2s linear 50ms;
position: absolute;
top: 100%; left: 0;
min-width: 100%;
}
nav li:hover ul {transform: scale(1,1);}
.pencilanim {
width:100px;
border-bottom: 10px red solid;
overflow: hidden;
position: relative;
}
.pencilanim::after {
content: '✎';
position: absolute;
bottom: -20px;
right: -10px;
}
.pencilanim_01 {
transform-origin: left 300px;
animation-name: drawALine;
animation-duration: 3s;
animation-timing-function: ease-in-out;
animation-iteration-count: 3;
animation-play-state: paused;
}
pre u {text-decoration:none; font-weight:bold;}
.card, .carda {
width: 200px;
height: 300px;
border-radius: 10px;
margin: auto;
position: absolute;
font-size: .8em;
perspective: 600px;
}
.card:hover,
.carda {transition: 1s ease;}
.card .front,
.carda .front {
float: none;
position: absolute;
top: 0;
left: 0;
z-index: 900;
width: inherit;
height: inherit;
border-radius: 10px;
border: 10px solid #fff;
text-align: center;
box-shadow: 0 1px 5px rgba(0,0,0,0.9);
transform: rotateX(0deg) rotateY(0deg);
transform-style: preserve-3d;
backface-visibility: hidden;
transition: all .4s ease-in-out;
background:
linear-gradient(-45deg, white 25%, transparent 25%, transparent 75%, red 75%, red) 0 0,
linear-gradient(-45deg, red 25%, transparent 25%, transparent 75%, white 75%, white) 1em 1em,
linear-gradient(45deg, red 17%, transparent 17%, transparent 25%, red 25%, red 36%, transparent 36%, transparent 64%, red 64%, red 75%, transparent 75%, transparent 83%, red 83%) 1em 1em;
background-color: white;
background-size: 2em 2em;
background-position: -1em -1em;
}
.card:hover .front {
z-index: 900;;
transform: rotateY(180deg);
box-shadow: 0 15px 50px rgba(0,0,0,0.2);
}
.card .back,
.carda .back {
float: none;
position: absolute;
top: 0;
left: 0;
z-index: 800;
width: inherit;
height: inherit;
background: #fff;
text-shadow: 1px 1px 1px rgba(0,0,0,0.6);
transform: rotateY(-180deg);
transform-style: preserve-3d;
backface-visibility: hidden;
transition: all .4s ease-in-out;
border-radius: 10px;
border: 10px solid #fff;
box-shadow: 0 1px 5px rgba(0,0,0,0.9);
}
.card:hover .back {
z-index: 1000;
transform: rotateY(0);
}
.card:first-of-type,
.carda:first-of-type {transform: rotate(-5deg);}
.card:nth-of-type(2):hover,
.carda.flipped:nth-of-type(2){transform: rotate(0) translatex(120px);}
.card:last-of-type,
.carda:last-of-type {transform: rotate(5deg);}
.card:first-of-type:hover{transform: rotate(10deg) translatey(180px);}
.carda.flipped:first-of-type{transform: rotate(-5deg) translate(240px, 25px);}
.carda.flipped .front,
.carda.unflipped .back {animation: flipme 1s linear forwards;}
.carda.unflipped .front,
.carda.flipped .back {animation: unflipme 1s linear both;}
/*
.carda.flipped:first-of-type {animation: flipme 1s linear forwards;}
.carda.flipped:nth-of-type(2){animation: flipme 1s linear forwards;}
.carda.flipped:last-of-type {animation: flipme 1s linear forwards;}
.carda.unflipped:first-of-type {animation: flipme 1s linear -1s alternate;}
.carda.unflipped:nth-of-type(2){animation: flipme 1s linear -1s alternate;}
.carda.unflipped:last-of-type {animation: flipme 1s linear -1s alternate;}
*/
@keyframes flipme {
0% {transform: rotatey(0deg)}
100% {transform: rotateY(-180deg);}
}
@keyframes unflipme {
0% {transform: rotatey(180deg)}
100% {transform: rotateY(0deg);}
}
.card .back, .carda .back {color:red; font-size: 50px; line-height: 300px; text-align:center;}
.card .back:after,
.carda .back:after {content: 'A'; position:absolute; top: 10px; left: 10px; line-height:20px;}
.card .back:before,
.carda .back:before {content: 'A'; position:absolute; bottom: 10px; right: 10px; line-height:20px;}
@keyframes showme {
0% {background-color:blue; transform: rotate(0deg) translate(200px, 0)}
50% {background-color:green;transform: rotate(22deg) translate(350px, -150px)}
100% {background-color: yellow; transform: rotate(45deg) translate(500px, -540px)}
}
@keyframes showme {
0% {background-color:green; transform: rotate(0deg) scale(1); left: 200px;}
100% {background-color: blue; transform: rotate(45deg) scale(1.5); left: 600px;}
}
.box {
padding:20px 50px;
position:relative;
}
.box span {
position: absolute;
left: 0;
top:20px;
width: 50px;
height:50px;
background-color: red;
animation: showme 5s linear 5s 1;
animation-play-state:paused;
transform-origin: 50% 100%;
}
.current:hover .box span {
animation-play-state: running;
}
span.afmforwards {
animation-fill-mode:forwards;
}
span.afmbackwards {
animation-fill-mode:backwards;
}
span.afmboth {
animation-fill-mode:both;
}
</style>
</head>
<body> <header>
<nav>
<ul>
<li class="button cancel" id="back">Back</li>
<li class="button done" id="next">Next</li>
</ul>
</nav>
</header>
<div id="presentation">
<div id="presentation-counter"></div>
<div id="slides">
<!-- Title Slide -->
<div class="slide intro">
<header>
<h1>Transforms, Transitions & Animations</h1>
<h2><a href="http://estelle.github.io/animation/30.html">estelle.github.io/animation/30.html</a></h2>
</header>
</div>
<!-- Transitions -->
<div class="slide normal">
<header><h1>2D Transform Functions</h1></header>
<section class="content">
<dl class="deprecated listed wide">
<dt><strong>translate</strong>(<length>[, <length>])</dt>
<dd>specifies a 2D translation by the vector [x, y], where x is the translation-value parameter for the x axis and y is the optional translation value along the y axis. parameter. If <em>y</em> is not provided, y==0.</dd>
<dt><strong>translateX</strong>(<length>)</dt>
<dd>specifies a translation by the given amount in the X direction.</dd>
<dt><strong>translateY</strong>(<length>)</dt>
<dd>specifies a translation by the given amount in the Y direction.</dd>
<dt><strong>scale</strong>(<number>[, <number>])</dt>
<dd>specifies 2D scaling operation by the [sx,sy]. If sy is not provided, sy will equal sx (growsing or shrinking with the same scale). Scale(1, 1) or scale(1) leaves an element in it's default state. Scale(2, 2) or scale(2) causes the element to appear twice as wide and twice as tall as its default size, taking up 4-times the original area.</dd>
<dt><strong>scaleX</strong>(<number>)</dt>
<dd>specifies a scale operation using the [sx, 1] scaling vector, where sx is given as the parameter.</dd>
<dt><strong>scaleY</strong>(<number>)</dt>
<dd>specifies a scale operation using the [1, sy] scaling vector, where sy is given as the parameter.</dd>
<dt><strong>rotate</strong>(<angle>)</dt>
<dd>specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the <em>transform-origin</em> property. For example, rotate(90deg) would cause elements to appear rotated one-quarter of a turn in the clockwise direction.</dd>
<dt><strong>skewX</strong>(<angle>)</dt>
<dd>specifies a skew transformation along the X axis by the given angle.</dd>
<dt><strong>skewY</strong>(<angle>)</dt>
<dd>specifies a skew transformation along the Y axis by the given angle.</dd>
<dt><strong>matrix</strong>(<num>, <num>, <num>, <num>, <num>, <num>)</dt>
<dd>Generally machine generated, specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix <strong>[a b c d e f]</strong>.</dd>
</dl>
</section>
</div>
<!-- example transform -->
<div class="slide" id="gencontentlink">
<header><h1>Multiple Tranforms</h1></header>
<section class="content"
<ul id="ABTrasform">
<li><b class="y">translate</b> <pre class="x">transform: <span contenteditable="" id="Atranslate">translate(-80px, 200px);</span></pre></li>
<li><b class="y">rotate</b> <pre class="x">transform: <span contenteditable="" id="Arotate">rotate(15deg);</span></pre></li>
<li><b class="y">scale</b> <pre class="x">transform: <span contenteditable="" id="Ascale">scale(1.5, 2);</span></pre></li>
<li><b class="y">skew</b> <pre class="x">transform: <span contenteditable="" id="Askew">skewX(-8deg);</span></pre></li>
<li>multiple transforms <pre>transform: <span contenteditable="" id="Btranslate">translate(-80px, 200px)</span>
<span contenteditable="" id="Brotate">rotate(-15deg)</span> <span contenteditable="" id="Bscale">scale(2, 1.5)</span> <span contenteditable="" id="Bskew">skewX(8deg)</span>;</pre></li>
</ul>
</section>
</div>
<div class="slide">
<header><h1>transform-origin property</h1></header>
<section class="content">
<p>Specifies the x and y position of the origin, relative to the transform object.</p>
<ul>
<li>Keyword positions: left, right, bottom, top, center</li>
<li>Length values</li>
<li>Percentage values </li>
<li>default is 50% 50% (or center center)</li>
<li>Supported in all browsers that support transform. Prefixed if transform is prefixed</li>
</section>
</div>
<div class="slide object">
<header><h1>Transforms</h1></header>
<object data="files/transform.html"></object>
<a href="files/transform.html" class="objectlink" target="play">Play</a>
</div>
<!-- Simplest Transition -->
<div class="slide normal">
<header><h1>Simplest Transition</h1></header>
<section class="content">
<pre style="font-size:140%;">a {
color: red;
}
a:hover {
color: yellow;
}</pre>
<p class="hoverme h1">Hover Over Me</p>
</section>
</div>
<!-- CSS3 Transition -->
<div class="slide normal">
<header><h1>CSS3 Transition</h1></header>
<section class="content">
<pre style="font-size:140%;">a {
color: red;
transition: 1s;
}
a:hover {
color: yellow;
}</pre>
<p class="hoverme h1 simptrans">Hover Over Me</p>
</section>
</div>
<!-- property overview -->
<div class="slide">
<header><h1>transitions</h1></header>
<section class="content">
<p>Enables the transition of properties from one state to the next over a defined length of time</p>
<ul>
<li><em>transition-property:</em> properties (or 'all') that transition</li>
<li><em>transition-duration:</em> s or ms it takes to transition</li>
<li><em>transition-timing-function:</em> bezier curve of transition</li>
<li><em>transition-delay:</em> s or ms before transition starts</li>
<li><em>transition:</em> shorthand for 4 transition properties</li>
</ul>
<ul class="icons" style="clear: both;">
<li class="chrome">Chrome</li>
<li class="safari">Safari</li>
<li class="firefox">Firefox 4/16</li>
<li class="opera">Opera 10.5</li>
<li class="ie new">IE 10</li>
<li class="txt"> With vendor prefix. No prefix FF16 & IE10. Not OperaMini or Win✆</li>
</ul>
</section>
</div>
<!-- font transition example -->
<div class="slide">
<header><h1>transitions</h1></header>
<section class="content">
<pre contenteditable class="code">code {
color: black;
font-size: 85%;
background-color: rgba(255,255,255,0.9);
transition: all 2s ease-in 50ms;
}
code:hover {
color: red;
font-size: 120%;
background-color: rgba(255,255,255,0.8);
}
</pre>
<pre contenteditable>code {
transition:
color, font-size, background-color 2s ease-in 50ms;
}</pre>
</section>
</div>
<!-- font transition example -->
<div class="slide">
<header><h1>transitions</h1></header>
<section class="content">
<pre contenteditable class="code code2">code {
color: black;
font-size: 85%;
background-color: rgba(255,255,255,0.9);
transition: all 2s ease-in 50ms;
}
code:hover {
color: red;
transform: scale(1.4);
transform-origin: 0 0;
background-color: rgba(255,255,255,0.8);
}
</pre>
<pre contenteditable>code {
transition:
transform 2s ease-in 50ms;
}</pre>
</section>
</div>
<!-- what can be transitioned? -->
<div class="slide normal">
<header><h1>What can be transitioned?</h1></header>
<section class="content">
<p>Anything that has intermediate values</p>
<pre style="width: 40%; float:left;" class="yes">code {
opacity: 1;
}
code:halfway {
opacity: 0.5;
}
code:hover {
opacity: 0;
}</pre>
<pre style="width: 40%; float:right;" class="no">code {
display: block;
}
code:halfway {
display: ???
}
code:hover {
display: none;
}</pre>
</section>
</div>
<!-- what can be transitioned2? -->
<div class="slide normal">
<header><h1>What can be transitioned?</h1></header>
<section class="content">
<p>2 values that have REAL intermediary values</p>
<pre style="width: 40%; float:left;" class="yes">code {
font-size: 100%;
}
code:halfway {
font-size: 110%;
}
code:hover {
font-size: 120%;
}</pre>
<pre style="width: 40%; float:right;" class="no">code {
height: auto;
}
code:halfway {
height: ???
}
code:hover {
height: 1000px;
}</pre>
</section>
</div>
<!-- list of tranisitionable properties -->
<div class="slide normal">
<header><h1>Transitionable Properties</h1></header>
<section class="content">
<ul class="columns">
<li>background-color</li>
<li>background-position</li>
<li>border-color</li>
<li>border-width</li>
<li>border-spacing</li>
<li>bottom</li>
<li>clip</li>
<li>color</li>
<li>crop</li>
<li>font-size</li>
<li>font-weight</li>
<li>height</li>
<li>left</li>
<li>letter-spacing</li>
<li>line-height</li>
<li>margin</li>
<li>max-height</li>
<li>max-width</li>
<li>min-height</li>
<li>min-width</li>
<li>opacity</li>
<li>outline-color</li>
<li>outline-offset</li>
<li>outline-width</li>
<li>padding</li>
<li>right</li>
<li>text-indent</li>
<li>text-shadow</li>
<li>top</li>
<li>vertical-align</li>
<li>visibility</li>
<li>width</li>
<li>word-spacing</li>
<li>z-index</li>
</ul>
</section>
</div>
<!-- transitioning transforms -->
<div class="slide normal">
<header><h1>Transitioning Transforms</h1></header>
<em class="spinbox"><i class="dot"></i><b class="pencil2 spin">✎</b></em>
<section class="content">
<pre contenteditable>
.pencil {
transition: all 1s ease-in 50ms;
transform-origin: 100px 123px;
}
.pencil:hover {
transform: rotate(360deg) scale(2);
}</pre>
</section>
</div>
<!-- Tranform Features (or Limitations) -->
<div class="slide normal">
<header><h1>Transition Features (or Limitations)</h1></header>
<section class="content">
<ul>
<li>Single Iteration</li>
<li>Reverse goes to initial state</li>
<li>No granular control</li>
<li>Limited methods of initiation</li>
<li>Can't force them to finish</li>
</ul>
</section>
</div>
<!-- Useful example -->
<div class="slide normal">
<header><h1>Putting it together in the Real World</h1></header>
<section class="content" style="min-height: 400px;">
<nav>
<ul>
<li>Bad
<ul>
<li>Me</li>
<li>You</li>
<li>Them</li>
<li>Nobody</li>
</ul>
</li>
<li>User
<ul>
<li>Door Post</li>
<li>Wall hanging</li>
<li>Stair Banister</li>
<li>Washington</li>
</ul></li>
<li>Experience
<ul>
<li>CSS3</li>
<li>JavaScript</li>
<li>HTML5</li>
<li>SEO</li>
</ul></li>
<li>Design
<ul>
<li>Party</li>
<li>Dinner</li>
<li>Hike</li>
<li>Foo Camp</li>
</ul></li>
</ul>
</nav>
<pre contenteditable>nav ul li {
list-style-type: none;
}
nav > ul > li {
display: inline-block;
position:relative;
}
nav ul ul {
transform: scale(1,0);
transform-origin: top center;
transition:0.2s linear 50ms;
position:absolute;
top: 100%;
}
nav li:hover ul {
transform: scale(1,1);
}</pre>
</section>
</div>
<div class="slide object">
<header><h1>Grok it</h1></header>
<object data="files/navbar.html"></object>
<a href="files/navbar.html" class="objectlink" target="play">Play</a>
</div>
<!-- card flip -->
<div class="slide normal">
<header><h1>Pick a card</h1></header>
<section class="content">
<div class="card">
<div class="front"></div>
<div class="back">♥</div>
</div>
<div class="card">
<div class="front"></div>
<div class="back" style="color: black">♣</div>
</div>
<div class="card">
<div class="front"></div>
<div class="back">♦</div>
</div>
<pre contenteditable style="height:500px; overflow:scroll; float: right;">.card {
position: absolute;
perspective: 600px;
}
.card:hover {
transition: 1s ease;
}
.card .front {
transform: rotateX(0deg) rotateY(0deg);
transform-style: preserve-3d;
backface-visibility: hidden;
transition: all .4s ease-in-out;
}
.card:hover .front {
transform: rotateY(180deg);
}
.card .back {
transform: rotateY(-180deg);
transform-style: preserve-3d;
backface-visibility: hidden;
transition: all .4s ease-in-out;
}
.card:hover .back {
transform: rotateY(0);
}
.card:first-of-type {
transform: rotate(-5deg);
}
.card:nth-of-type(2):hover {
transform: rotate(0) translatex(120px);
}
.card:last-of-type {
transform: rotate(5deg);
}
.card:first-of-type:hover {
transform: rotate(10deg) translatey(180px);
}
</pre>
</section>
</div>
<div class="slide intro">
<header><h1>Animations</h1></header>
<section class="content">
<ul class="icons" style="clear: both;">
<li class="chrome">Chrome</li>
<li class="safari">Safari</li>
<li class="firefox">Firefox 5/16</li>
<li class="opera new">Opera 12</li>
<li class="ie new">IE 10</li>
<li class="txt"> With vendor prefix. No prefix FF16 & IE10. Not OperaMini or Win✆</li>
</ul>
</section>
</div>
<div class="slide normal">
<header><h1>Animation Features (or limitations)</h1></header>
<section class="content">
<ul>
<li>Single, many or infinite iterations</li>
<li>Single or bi-directional</li>
<li>Granular control</li>
<li>Can be initiated on page load</li>
<li>Has more robust JS Hooks</li>
<li>Can be paused</li>
<li>Lowest priority in UI Thread</li>
</ul>
</section>
</div>
<div class="slide normal">
<header>
<h1>Animation Essentials</h1>
</header>
<section class="content">
<ul class="imp">
<li>@keyframes</li>
<li>animation-name</li>
<li>animation-duration</li>
<li>animation-timing-function</li>
<li>animation-iteration-count</li>
<li>animation-direction</li>
<li>animation-play-state</li>
<li>animation-delay</li>
<li>animation-fill-mode</li>
<li>animation (shorthand)</li>
</ul>
</section>
</div>
<!--
<div class="slide intro">
<header><h1>@Keyframes</h1></header>
<section class="content">
</section>
</div>
<div class="slide">
<header><h1>Keyframes</h1></header>
<section class="content">
<b class="pencil pencil_01">✎</b>
<pre contenteditable><b>@keyframes</b> <b>writing</b> {
<b>from</b> {
left: 0;
}
<b>to</b> {
left: 100%;
}
}</pre>
</section>
</div>
-->
<!--
<div class="slide">
<header><h1>Keyframes</h1></header>
<section class="content">
<b class="pencil pencil_01">✎</b>
<pre contenteditable>@keyframes writing {
<b>0%</b> {
left: 0;
}
<b>100%</b> {
left: 100%;
}
}</pre>
<p>Don't forget the <b class="imp" style="border-bottom:double 3px;">%</b></p>
<p>Don't quote the animation name</p>
</section>
</div>