forked from EliseWei/gdi-core-intermediate-html-css
-
Notifications
You must be signed in to change notification settings - Fork 0
/
class2.html
1014 lines (950 loc) · 33.8 KB
/
class2.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 lang="en">
<head>
<meta charset="utf-8">
<title>Class 2 ~ Beyond the Basics of HTML/CSS ~ Girl Develop It</title>
<meta name="description" content="This is the official Girl Develop It Intermediate Core HTML/CSS curriculum. It was developed through the contributions of Julie Pagano, Jen Myers, Alexis Goldstein and Izzy Johnston.
The course is meant to be taught in 4 two-hour sections. Each of the slides and practice files are customizable according to the needs of a given class or audience.">
<meta name="author" content="Girl Develop It">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<link rel="stylesheet" href="reveal/css/reveal.css">
<link rel="stylesheet" href="reveal/css/theme/gdidefault.css" id="theme">
<!-- For syntax highlighting -->
<!-- light editor<link rel="stylesheet" href="lib/css/light.css">-->
<!-- dark editor--><link rel="stylesheet" href="reveal/lib/css/dark.css">
<!-- For the slides -->
<link rel="stylesheet" href="css/slides.css">
<!-- If use the PDF print sheet so students can print slides-->
<link rel="stylesheet" href="reveal/css/print/pdf.css" type="text/css" media="print">
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<!-- Opening slide -->
<section>
<img src="images/gdi_logo_badge.png" alt="">
<h3>Beyond the Basics of HTML/CSS</h3>
<h4>Class 2</h4>
</section>
<!-- Welcome-->
<section>
<h3>Welcome!</h3>
<div class="left-align">
<p>Girl Develop It is here to provide affordable and accessible programs to learn software through mentorship and hands-on instruction.</p>
<p class="green">Some "rules"</p>
<ul>
<li>We are here for you!</li>
<li>Every question is important</li>
<li>Help each other</li>
<li>Have fun</li>
</ul>
</div>
</section>
<section>
<img src="images/css3.svg" alt=""/>
</section>
<section>
<h2>CSS3 Background</h2>
<ul>
<li>Series of modules that are designed to be implemented separately and independently from each other</li>
<li>Enhances display and interactions</li>
</ul>
</section>
<section>
<h2>New Selectors</h2>
</section>
<!-- Attribute Selectors-->
<section>
<section>
<h2>Attribute Selectors</h2>
<p>Not just classes and ids any more!</p>
<ul>
<li class="fragment"><strong>E[foo^="bar"]</strong> <br/>an element whose "foo" attribute value begins exactly with the string "bar"</li>
<li class="fragment"><strong>E[foo$="bar"]</strong> <br/>an element whose "foo" attribute value ends exactly with the string "bar"</li>
<li class="fragment"><strong>E[foo*="bar"]</strong> <br/>an element whose "foo" attribute value contains the substring "bar"</li>
</ul>
</section>
<section class="attribute-selectors">
<h2>Attribute Selectors</h2>
<pre><code>div[foo^="bar"] {
color: red;
}
div[foo$="bar"] {
background-color: red;
}
div[foo*="bar"] {
border: solid 5px red;
}</code></pre>
<article>
<div foo="barley">foo="barley"</div>
<div foo="lumbar">foo="lumbar"</div>
<div foo="embark">foo="embark"</div>
</article>
</section>
<section class="attribute-selectors">
<h2>Attribute Selectors</h2>
<p>People don't actually use foo do they?</p>
<pre><code>a[href^="http://"] {
color: red;
}
img[src$=".jpg"] {
border: solid 5px red;
}</code></pre>
<article>
<a href="http://www.girldevelopit.com" target="_blank">http://www.girldevelopit.com</a>
<img src="images/dinosaur.jpg" title="dinosaur" alt="" style="float:right;"/>
</article>
</section>
</section>
<!-- Nth child-->
<section>
<section>
<h2>:nth-child pseudo-class selector</h2>
<p class="yellow fragment" style="font-size: 1.2em">Say WHAT???</p>
<p class="fragment">Ever want to style a table so that every other row was a different color?</p>
<p class="fragment">Or have a gallery of images so that each row is 3 images wide?</p>
<p class="fragment">:nth-child pseudo-class is used to style every 2nd, 3rd, 4th, or "nth" element</p>
</section>
<section>
<h2>:nth-child pseudo-class selector</h2>
<p>matches an element that has position <em>an+b</em></p>
<pre><code class="css">
element:nth-child(an + b) { style properties }
</code></pre>
<h4>some examples</h4>
<ul>
<li><strong>3</strong> - selects the third element</li>
<li><strong>4n</strong> - selects every fourth element</li>
<li><strong>even</strong> - selects even elements</li>
<li><strong>odd</strong> - selects odd elements</li>
</ul>
</section>
<section class="nth-child-table">
<h2>:nth-child</h2>
<pre><code>tbody tr:nth-child(an + b) { backround-color: red; }</code></pre>
<p>
<input type="text" id="nth-child-value" value="" />
<input type="button" value="change"/>
</p>
<table>
<thead>
<tr>
<th>n</th>
<th>2n+1</th><th>4n+1</th><th>4n+4</th>
<th>4n </th><th>5n-2</th><th>-n+3</th>
</tr>
</thead>
<tbody>
<tr>
<th>0 </th>
<td>1 </td><td>1 </td><td>4 </td>
<td>- </td><td>- </td><td>3 </td>
</tr>
<tr>
<th>1 </th>
<td>3 </td><td>5 </td><td>8 </td>
<td>4</td><td>3</td><td>2</td>
</tr>
<tr>
<th>2 </th>
<td>5 </td><td>9 </td><td>12</td>
<td>8</td><td>8</td><td>1</td>
</tr>
<tr>
<th>3 </th>
<td>7 </td><td>13</td><td>16</td>
<td>12</td><td>13</td><td>- </td>
</tr>
<tr>
<th>4 </th>
<td>9 </td><td>17</td><td>20</td>
<td>16</td><td>18</td><td>- </td>
</tr>
<tr>
<th>5 </th>
<td>11</td><td>21</td><td>24</td>
<td>20</td><td>23</td><td>- </td>
</tr>
</tbody>
</table>
<a href="http://css-tricks.com/how-nth-child-works/" target="_blank">reference</a>
</section>
</section>
<!-- Pseudo form selectors-->
<section>
<section>
<h2>Some other pseudo-class Selectors</h2>
<ul>
<li class="fragment">
<strong>E:last-child</strong><br/> an element, last child of its parent
</li>
<li class="fragment">
<strong>E:only-child</strong><br/> an element, only child of its parent
</li>
<li class="fragment">
<strong>E:empty</strong><br/> an element that has no children (including text nodes)
</li>
<li class="fragment">
<strong>E:not</strong><br/> an element that does not match simple selector
</li>
</ul>
</section>
<section class="pseudo-enabled">
<h2>:enabled & :disabled</h2>
<p>You can style form elements that are disabled and enabled</p>
<pre><code>
input:enabled { background-color: green; }
input:disabled { background-color: grey; }
</code></pre>
<div class="example">Enabled: <input type="text"/></div>
<div class="example">Disabled: <input type="text" disabled/></div>
</section>
<section class="pseudo-checked">
<h2>:checked</h2>
<p>You can style checkboxes and radio buttons when they are selected</p>
<pre><code>
input:checked + label {
color: red;
}
</code></pre>
<p>
<input type="checkbox" id="checkbox1">
<label for="checkbox1">checkbox</label>
</p>
<p>
<input type="radio" name="radio" id="radio1" />
<label for="radio1">radio</label>
<input type="radio" name="radio" id="radio2" />
<label for="radio2">radio</label>
<input type="radio" name="radio" id="radio3" />
<label for="radio3">radio</label>
</p>
</section>
</section>
<!-- Let's Develop It -->
<section data-state="activity">
<section>
<h2>Let's Develop It!</h2>
<p>Enhance our Women in Computing web site to use HTML5 & CSS3</p>
</section>
<section>
<h2>Use a pseudo-selector</h2>
<p>We need to clear every 4th famous woman</p>
<p>Previously, this was done by manually adding a <strong>break</strong> class to every 4th element</p>
<img src="images/screenshots/famous-break.png" alt=""/>
<p>Replace this with an <strong>:nth-child</strong> selector</p>
</section>
<section>
<h2>Example solutions</h2>
<p>Make the rows of women three long</p>
<pre><code>
#famous article:nth-child(4n) {
clear: both;
}
</code></pre>
<pre><code>
#famous div:nth-child(4n) {
clear: both;
}
</code></pre>
</section>
</section>
<!-- Vendor Prefixes-->
<section>
<section>
<h2>Vendor Prefixes</h2>
<p>HTML5 and CSS3 are still new!</p>
<p>This is great, but it means that not all browsers treat new CSS3 properties the same</p>
</section>
<section>
<h2>Vendor Prefixes</h2>
<a href="http://caniuse.com/#feat=border-radius" target="_blank">
<img src="images/screenshots/caniuse-border-radius.png" alt="">
</a>
</section>
<section>
<h2>Vendor Prefixes</h2>
<ul>
<li>Flags it as a work-in-progress</li>
<li>When finished, the browser should support the non-prefixed name</li>
</ul>
</section>
<section>
<h2>Vendor Prefixes</h2>
<h4>each browser has their own</h4>
<ul>
<li class="chrome">-webkit-</li>
<li class="firefox">-moz-</li>
<li class="ie">-ms-</li>
<li class="webkit">-webkit-</li>
<li class="opera">-o-</li>
</ul>
</section>
<section>
<h2>Vendor Prefixes</h2>
<pre><code>
.example{
-moz-property: value;
-ms-property: value;
-webkit-property: value;
-o-property: value;
property: value;
}
</code></pre>
<h4>order matters</h4>
<p>the non-prefixed property should always go last</p>
</section>
<section>
<h2>Vendor Prefixes</h2>
<ul>
<li>A little annoying, but totally worth it!</li>
<li>Tools available to help (e.g. Compass)</li>
</ul>
</section>
</section>
<!-- Border Radius-->
<section>
<section>
<h2>border-radius</h2>
<p>Allows you to create rounded corners</p>
</section>
<section class="border-radius">
<h2>border-radius</h2>
<pre><code>
#example1 { border-radius: 20px; }
</code></pre>
<div class="sliders" style="width:55%;">
<p>
<span class="border-radius-value">20</span>px on all corners
<input type="range" min="0" max="100" value="20">
</p>
</div>
<div class="example" id="example1">
</div>
</section>
<section class="border-radius">
<h2>border-radius</h2>
<pre><code>
#example2 { border-radius: 10px 40px; }
</code></pre>
<div class="sliders" style="width:75%;">
<p>
<span class="border-radius-value">10</span>px on top left & bottom right
<input type="range" min="0" max="100" value="10">
</p>
<p>
<span class="border-radius-value">40</span>px on top right & bottom left
<input type="range" min="0" max="100" value="40">
</p>
</div>
<div class="example" id="example2">
</div>
</section>
<section class="border-radius">
<h2>border-radius</h2>
<pre><code>#example3 { border-radius: 10px 20px 40px 80px; }</code></pre>
<div class="sliders" style="width: 50%;">
<p>
<span class="border-radius-value">10</span>px on top left
<input type="range" min="0" max="100" value="10">
</p>
<p>
<span class="border-radius-value">20</span>px top right
<input type="range" min="0" max="100" value="20">
</p>
<p>
<span class="border-radius-value">40</span>px bottom right
<input type="range" min="0" max="100" value="40">
</p>
<p>
<span class="border-radius-value">80</span>px bottom left
<input type="range" min="0" max="100" value="80">
</p>
</div>
<div class="example" id="example3">
</div>
</section>
<section>
<h2>border-radius</h2>
<pre><code>#example4, #example5 {
border-radius: 50%;
}</code></pre>
<p>Creates an ellipse</p>
<p>Creates a circle if height == width</p>
<article class="border-radius">
<div class="example" id="example4">
</div>
<div class="example" id="example5">
</div>
</article>
</section>
<section>
<h2>Border-Radius</h2>
<p>Remember vendor prefixes? This is where we would use one</p>
<pre><code>
#example1 {
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
}
</code></pre>
</section>
</section>
<!-- RGBA and Opacity-->
<section>
<section>
<h2>rgba colors & opacity</h2>
<p>In CSS, we can choose colors with hexadecimal <span style="color: #00ff00">#00ff00</span> or <span style="color: rgb(0, 2255, 0)">rgb(0, 255, 0)</span></p>
<p>In CSS3, there are ways to control opacity of a color too!</p>
<ul>
<li><strong>rgba</strong> - control the opacity of a color</li>
<li><strong>opacity</strong> - control the opacity of an element</li>
</ul>
</section>
<section>
<h2>rgba colors & opacity</h2>
<article class="rgba-opacity">
<article class="fragment">
<div class="example1 opacity">
background-color: rgb(255, 0, 0); opacity: 1;
</div>
<div class="example1 rgba">
background-color: rgba(255, 0, 0, 1);
</div>
</article>
<article class="fragment">
<div class="example2 opacity">
background-color: rgb(255, 0, 0); opacity: 0.8;
</div>
<div class="example2 rgba">
background-color: rgba(255, 0, 0, 0.8);
</div>
</article>
<article class="fragment">
<div class="example3 opacity">
background-color: rgb(255, 0, 0); opacity: 0.5;
</div>
<div class="example3 rgba">
background-color: rgba(255, 0, 0, 0.5);
</div>
</article>
<article class="fragment">
<div class="example4 opacity">
background-color: rgb(255, 0, 0); opacity: 0.2;
</div>
<div class="example4 rgba">
background-color: rgba(255, 0, 0, 0.2);
</div>
</article>
<article class="fragment">
<div class="example5 opacity">
background-color: rgb(255, 0, 0); opacity: 0;
</div>
<div class="example5 rgba">
background-color: rgba(255, 0, 0, 0);
</div>
</article>
</article>
</section>
<section>
<h2>rgba colors</h2>
<p>control the opacity of a color</p>
<pre><code>
.example2.rgba {
background-color: rgba(255, 0, 0, 0.8);
}
</code></pre>
<p>color property using (red, green, blue, opacity)</p>
<p>opacity is a decimal value from 0 to 1</p>
<ul>
<li>0 - not visible</li>
<li>1 - fully visible</li>
</ul>
</section>
<section>
<h2>opacity</h2>
<p>control the opacity of an element</p>
<pre><code>
.example2.opacity {
opacity: 0.8;
}
</code></pre>
<p>decimal value from 0 to 1</p>
<ul>
<li>0 - not visible</li>
<li>1 - fully visible</li>
</ul>
</section>
</section>
<!-- Box Shadow-->
<section class="box-shadow">
<section>
<h2>box-shadow</h2>
<p>adds a drop shadow to an element</p>
</section>
<section class="example1">
<h2>box-shadow</h2>
<p>box-shadow: offset-x offset-y color</p>
<pre><code>
.example1 { box-shadow: 1px 1px red; }
</code></pre>
<p>
<label>offset-x:</label>
<input type="range" min="0" max="10" value="1">
<label>offset-y:</label>
<input type="range" min="0" max="10" value="1">
</p>
<div></div>
</section>
<section class="example2">
<h2>box-shadow</h2>
<p>box-shadow: offset-x offset-y blur spread color</p>
<pre><code>
.example1 { box-shadow: 0 0 1px 1px red; }
</code></pre>
<p>
<label>inset:</label>
<input type="checkbox" >
<label>blur:</label>
<input type="range" min="0" max="10" value="1">
<label>spread:</label>
<input type="range" min="0" max="10" value="1">
</p>
<div></div>
</section>
</section>
<!--Text Shadow-->
<section>
<h2>text-shadow</h2>
<pre><code>#example1 { text-shadow: 2px 2px 10px red; }
#example2 {
text-shadow: 1px 1px 10px red,
10px 10px 10px orange,
15px 15px 10px yellow,
20px 20px 10px green,
25px 25px 10px blue,
30px 30px 10px purple;
}</code></pre>
<article class="text-shadow">
<div class="example1">lorem ipsum</div>
<div class="example2">lorem ipsum</div>
</article>
</section>
<!-- Gradients-->
<section>
<section>
<h2>gradients</h2>
<p>Build gradients with CSS</p>
</section>
<section>
<h2>linear gradients</h2>
<pre><code class="css">.linear-example1 {
background-image: linear-gradient(red, orange, yellow, green, blue, indigo, violet);
}
.linear-example2 {
background-image: linear-gradient(right, red, orange, yellow, green, blue, indigo, violet);
}
.linear-example3 {
background-image: linear-gradient(bottom right, red, orange, yellow, green, blue, indigo, violet);
}</code></pre>
<article class="gradients">
<div class="linear-example1">
</div>
<div class="linear-example2">
</div>
<div class="linear-example3">
</div>
</article>
</section>
<section>
<h2>linear gradients</h2>
<pre><code class="css">.linear-example4 {
background-image: linear-gradient(red, white);
}
.linear-example5 {
background-image: linear-gradient(right, red, white);
}
.linear-example6 {
background-image: linear-gradient(bottom right, red, white);
}</code></pre>
<article class="gradients">
<div class="linear-example4">
</div>
<div class="linear-example5">
</div>
<div class="linear-example6">
</div>
</article>
</section>
<section>
<h2>radial gradients</h2>
<pre><code>.radial-example1 {
background-image: radial-gradient(circle cover, red, orange, yellow, green, blue, indigo, violet);
}
.radial-example2 {
background-image: radial-gradient(0 0, circle, red, orange, yellow, green, blue, indigo, violet);
}
.radial-example3 {
background-image: radial-gradient(0 50%, circle, red, orange, yellow, green, blue, indigo, violet);
}</code></pre>
<article class="gradients">
<div class="radial-example1">
</div>
<div class="radial-example2">
</div>
<div class="radial-example3">
</div>
</article>
</section>
<section>
<h2>radial gradients</h2>
<pre><code>.radial-example4 {
background-image: radial-gradient(circle cover, red, white);
}
.radial-example5 {
background-image: radial-gradient(0 0, circle, red, white);
}
.radial-example6 {
background-image: radial-gradient(0 50%, circle, red, white);
}</code></pre>
<article class="gradients">
<div class="radial-example4">
</div>
<div class="radial-example5">
</div>
<div class="radial-example6">
</div>
</article>
</section>
<section>
<h2>gradients</h2>
<a href="http://www.colorzilla.com/gradient-editor/" target="_blank">Gradient Editor</a>
</section>
</section>
<!-- Buttons-->
<section>
<h2>Example: CSS3 Buttons</h2>
<a href="http://hellohappy.org/css3-buttons/" target="_blank">
<img src="images/screenshots/css3-buttons.png" alt=""/>
</a>
</section>
<!-- Backgrounds-->
<section class="multiple-backgrounds">
<h2>backgrounds</h2>
<p>CSS3 allows multiple background images</p>
<pre><code>.example {
background-image: url('../images/html5-features.png'),
url('../images/sky.jpg');
}</code></pre>
<div class="example">
</div>
</section>
<!-- Caution-->
<section>
<h2>Shiny CSS3 Features</h2>
<h3>Use in Moderation</h3>
</section>
<!-- Let's Develop It-->
<section data-state="activity">
<section>
<h2>Let's Develop It</h2>
<p>Enhance our Women in Computing web site to use HTML5 & CSS3</p>
</section>
<section>
<h2>Enhance the site using CSS3 properties</h2>
<ul>
<li>Tackle one small problem at a time</li>
<li>You have 10-15 minutes to get started</li>
<li>You won't be able to change everything - if we have time, you can continue at the end of the workshop</li>
</ul>
</section>
<section>
<h2>Suggestions</h2>
<ul>
<li>Give the navigation links rounded corners</li>
<li>Turn the famous women images into circles</li>
<li>Give the section headings a text shadow</li>
<li>Give the famous women images a box shadow</li>
<li>Change the opacity of a famous woman on hover</li>
<li>Change the opacity of organization logos on hover</li>
<li>Add text shadow to the page title</li>
</ul>
</section>
</section>
<!-- Transitions-->
<section>
<section>
<h2>Transitions</h2>
<p>Allow property changes in CSS values to occur smoothly over a specified duration</p>
<p class="fragment">Create some awesome effects without any JavaScript</p>
</section>
<section>
<h2>Transition Triggers</h2>
<ul>
<li>Hover</li>
<li>Mouse click</li>
<li>Focus state</li>
<li>Active state</li>
<li>Changes to the element</li>
</ul>
</section>
<section>
<h2>Transition Properties</h2>
<ul>
<li>transition-property</li>
<li>transition-duration</li>
<li>transition-delay</li>
<li>transition-timing-function</li>
</ul>
</section>
<section>
<h2>transition-property</h2>
<p>the names of CSS properties that should be transitioned</p>
<pre><code>
.example1 { transition-property: background-color; }
</code></pre>
<p>set to <strong>all</strong> to transition all CSS properties</p>
<pre><code>
.example2 { transition-property: all; }
</code></pre>
</section>
<section>
<h2>transition-property</h2>
<p>
<a href="http://leaverou.github.com/animatable/" target="_blank">animatable examples</a>
</p>
<p>
<a href="http://www.w3.org/TR/css3-transitions/#animatable-css" target="_blank">full list of supported properties</a>
</p>
</section>
<section class="transition-duration">
<h2>transition-duration</h2>
<p>the number of seconds or milliseconds a transition animation should take to complete</p>
<pre><code>
.example1 { transition-duration: 2s; }
</code></pre>
<div class="sliders" style="width:40%;">
<p>
<span class="value">2</span>s duration
<input type="range" min="0" max="10" value="3">
</p>
</div>
<div class="example">
</div>
</section>
<section class="transition-delay">
<h2>transition-delay</h2>
<p>delay transitions from the moment a trigger happens</p>
<pre><code>.example1 { transition-delay: 0s; }
.example2 { transition-delay: 1s; }
.example3 { transition-delay: 2s; }
.example4 { transition-delay: 3s; }</code></pre>
<article>
<div class="example4">3</div>
<div class="example3">2</div>
<div class="example2">1</div>
<div class="example1">0</div>
</article>
</section>
<section class="transition-timing-function">
<h2>transition-timing-function</h2>
<p>determines how intermediate values are calculated</p>
<pre><code>.example { transition-timing-function: ease; }</code></pre>
<article>
<div class="ease">ease</div>
<div class="linear">linear</div>
<div class="ease-in">ease-in</div>
<div class="ease-out">ease-out</div>
<div class="ease-in-out">ease-in-out</div>
<div class="cubic-bezier">cubic-bezier</div>
</article>
<a href="http://cubic-bezier.com/" target="_blank">cubic-bezier</a>
</section>
</section>
<!-- Transformations-->
<section>
<section>
<h2>Transforms</h2>
<p>Allow elements rendered by CSS to be transformed in space</p>
</section>
<section>
<h2>Transform: Scale</h2>
<p>scales the element</p>
<p>transform: scale(sx[, sy]);</p>
<article class="transform-scale">
<div class="example1">
scale(2);
</div>
<div class="example2">
scale(0.5);
</div>
<div class="example4">
scale(1, 0.5);
</div>
<div class="example3">
scale(0.5, 1);
</div>
</article>
</section>
<section>
<h2>Transform: Rotate</h2>
<p>rotates the element degrees around its origin</p>
<p>transform: rotate(angle);</p>
<article class="transform-rotate">
<div class="example1">
rotate(45deg);
</div>
<div class="example2">
rotate(-45deg);
</div>
<div class="example3">
rotate(-90deg);
</div>
<div class="example4">
rotate(180deg);
</div>
</article>
</section>
<section>
<h2>Transform: Translate</h2>
<p>move element using x and y coordinates</p>
<p>transform: translate(ax[, ay]);</p>
<article class="transform-translate">
<div class="example1">
translate(20px);
</div>
<div class="example2">
translate(0, 20px);
</div>
<div class="example3">
translate(-20px, 20px);
</div>
</article>
</section>
<section>
<h2>Transform-origin</h2>
<p>the x and y origin for transformation</p>
<p>transform-origin: x-offset y-offset;</p>
<article class="transform-origin">
<div class="example1">
transform-origin(top, left)
</div>
<div class="example2">
transform-origin(50%, 50%)
</div>
<div class="example3">
transform-origin(0, 50px)
</div>
</article>
</section>
<section>
<h2>3D transforms</h2>
<a href="http://desandro.github.com/3dtransforms/" target="_blank">examples</a>
</section>
</section>
<!-- Animations-->
<section>
<section>
<h2>Animations</h2>
<p>animate transitions from one CSS style configuration to another</p>
</section>
<section>
<h2>Animations</h2>
<h4>Two Components</h4>
<ol>
<li>style describing the CSS animation</li>
<li>a set of keyframes that indicate the start and end states of the animation's style</li>
</ol>
</section>
<section>
<h2>Animations</h2>
<a href="http://leaverou.github.com/animatable/" target="_blank">animatable</a>
<pre><code>@-webkit-keyframes background-color{
from { background-color: slategray }
to { background-color: black }
}
#background-color {
-webkit-animation: background-color 1s infinite alternate;
background-color: slategray
}</code></pre>
</section>
<section>
<h2>Benefits of CSS3 Animations</h2>
<h4>Over JavaScript Animations</h4>
<ul>
<li>Easy for simple animations (no JavaScript required)</li>
<li>Performance</li>
</ul>
</section>
</section>
<!-- Let's Develop It -->
<section data-state="activity">
<section>
<h2>Let's Develop It!</h2>
<p>Enhance our Women in Computing web site to use HTML5 & CSS3</p>
</section>
<section>
<h2>Continue enhancing the site using HTML5 & CSS3</h2>
<ul>
<li>Tackle one small problem at a time</li>
<li>Ask for help when you need it</li>
<li>Continue migrating to HTML5</li>
<li>Continue enhancing using CSS3</li>
</ul>
</section>
<section>
<h2>Suggestions</h2>
<ul>
<li>Add transitions to the navigation links</li>
<li>Rotate the famous women images on hover</li>
<li>Add transitions to the jump arrows</li>
<li>Add transitions to the organization images on hover</li>
<li>Add a gradient to the footer background</li>
</ul>
</section>
</section>
<!-- Questions? -->
<section>
<h2>Questions?</h2>
<div style="font-size:1000%; height:100%; margin-top:20%" class="blue">?
</div>
</section>
</div>
<footer>
<div class="copyright">
Intermediate HTML/CSS ~ Girl Develop It ~
<a rel="license" href="http://creativecommons.org/licenses/by-nc/3.0/deed.en_US"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc/3.0/80x15.png" /></a>
</div>
</footer>
</div>
<script src="reveal/lib/js/head.min.js"></script>
<script src="reveal/js/reveal.min.js"></script>
<script src="js/jquery-1.8.2.min.js"></script>
<script src="js/slides.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'linear', // default/cube/page/concave/zoom/linear/none
// Optional libraries used to extend on reveal.js