-
L
-
tink
+
+
#JavaScript30 Drum Example
+
@@ -59,6 +62,37 @@
diff --git a/01 - JavaScript Drum Kit/style.css b/01 - JavaScript Drum Kit/style.css
index 3e0a320b37..8fb4122518 100644
--- a/01 - JavaScript Drum Kit/style.css
+++ b/01 - JavaScript Drum Kit/style.css
@@ -1,50 +1,68 @@
-html {
- font-size: 10px;
- background:url(http://i.imgur.com/b9r5sEL.jpg) bottom center;
+html,
+body {
+ height: 100%;
+}
+
+body {
+ background: url(http://pearldrum.com/common/assets/images/background.jpg);
+ background-position: center center;
background-size: cover;
+ background-repeat: no-repeat;
}
-body,html {
- margin: 0;
- padding: 0;
- font-family: sans-serif;
+.layer {
+ background-color: rgba(85, 85, 85, 0.7);
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
}
-.keys {
- display:flex;
- flex:1;
- min-height:100vh;
- align-items: center;
- justify-content: center;
+h1 {
+ color: white;
+ text-transform: uppercase;
+ text-align: center;
+ text-shadow: 2px 2px 2px black;
}
-.key {
- border:4px solid black;
- border-radius:5px;
- margin:1rem;
- font-size: 1.5rem;
- padding:1rem .5rem;
- transition:all .07s;
- width:100px;
+.drums {
+ margin-top: 50px;
+ width: 100%;
+ height: 100px;
+ margin: 120px auto;
+}
+.drums .drumkit {
text-align: center;
- color:white;
- background:rgba(0,0,0,0.4);
- text-shadow:0 0 5px black;
+ vertical-align: middle;
}
-
-.playing {
- transform:scale(1.1);
- border-color:#ffc600;
- box-shadow: 0 0 10px #ffc600;
+.drum {
+ border: 4px solid black;
+ width: 90px;
+ height: 80px;
+ display: inline-block;
+ margin: 10px;
+ vertical-align: middle;
+ background-color: rgba(0, 0, 0, 0.5);
+ border-radius: 5px;
+ transition: all 0.6s;
}
-
-kbd {
+.drum:hover, .drum.playing {
+ box-shadow: 0 0 10px #fff;
+ transform: scale(1.05);
+}
+.drum-note {
display: block;
- font-size: 40px;
+ text-transform: uppercase;
+ margin-top: 10px;
+ color: white;
+ font-family: serif;
+ font-weight: bold;
+ font-size: 20px;
}
-
-.sound {
- font-size: 1.2rem;
+.drum-sound {
text-transform: uppercase;
- letter-spacing: 1px;
- color:#ffc600;
+ margin-top: 10px;
+ color: #ffc600;
+ font-size: 12px;
}
+
diff --git a/02 - JS + CSS Clock/index-START.html b/02 - JS + CSS Clock/index-START.html
index 259280d228..ff218f8712 100644
--- a/02 - JS + CSS Clock/index-START.html
+++ b/02 - JS + CSS Clock/index-START.html
@@ -6,6 +6,7 @@
+
JS + CSS CLOCK
@@ -61,12 +62,46 @@
background:black;
position: absolute;
top:50%;
+ transform-origin: 100%;
+ transform: rotate(90deg);
+ transition: all 0.05s;
+ transition-timing-function: cubic-bezier(0.1, 2.7, 0.58, 1);
}
diff --git a/03 - CSS Variables/index-START.html b/03 - CSS Variables/index-START.html
index bf0f33e3ba..0f856b84c0 100644
--- a/03 - CSS Variables/index-START.html
+++ b/03 - CSS Variables/index-START.html
@@ -12,10 +12,10 @@
Update CSS Variables with JS
-
+
-
+

@@ -25,6 +25,21 @@
Update CSS Variables with JS
/*
misc styles, nothing to do with CSS variables
*/
+ :root {
+ --base: #61f568;
+ --spacing: 10px;
+ --blur: 0px;
+ }
+
+ img {
+ padding: var(--spacing);
+ background: var(--base);
+ filter: blur(var(--blur));
+ }
+
+ .hl {
+ color: var(--base);
+ }
body {
text-align: center;
@@ -53,6 +68,16 @@
Update CSS Variables with JS