Spaces:
Running
Running
Update index.html
Browse files- index.html +3 -3
index.html
CHANGED
@@ -136,11 +136,11 @@
|
|
136 |
border-bottom: 4px solid #181818;
|
137 |
border-radius: 0 0 3px 3px;
|
138 |
position: absolute;
|
139 |
-
z-index:
|
140 |
box-shadow: -1px 0 2px rgba(0,0,0,0.4), 1px 0 2px rgba(0,0,0,0.4), 0 2px 3px rgba(0,0,0,0.55), inset 0 -1px 1px rgba(60,60,60,0.3);
|
141 |
}
|
142 |
.key.active { /* Applied when key is pressed by user or MIDI */
|
143 |
-
z-index:
|
144 |
}
|
145 |
.white-key.active {
|
146 |
background: linear-gradient(to bottom, #d5d5d5, #c2c2c2);
|
@@ -289,7 +289,7 @@
|
|
289 |
keyElement.classList.add('black-key');
|
290 |
// Position black key centered over the "crack" of the preceding white key
|
291 |
// currentWhiteKeyVisualOffset is the right edge of the *previous* white key
|
292 |
-
keyElement.style.left = (currentWhiteKeyVisualOffset - (BLACK_KEY_WIDTH_PX / 2) - (WHITE_KEY_OVERLAP_PX / 2)) + 'px';
|
293 |
keyElement.style.top = '0px';
|
294 |
} else { // White key
|
295 |
keyElement.classList.add('white-key');
|
|
|
136 |
border-bottom: 4px solid #181818;
|
137 |
border-radius: 0 0 3px 3px;
|
138 |
position: absolute;
|
139 |
+
z-index: 3; /* White keys: 1, Active keys: 3, Particles: 4 */
|
140 |
box-shadow: -1px 0 2px rgba(0,0,0,0.4), 1px 0 2px rgba(0,0,0,0.4), 0 2px 3px rgba(0,0,0,0.55), inset 0 -1px 1px rgba(60,60,60,0.3);
|
141 |
}
|
142 |
.key.active { /* Applied when key is pressed by user or MIDI */
|
143 |
+
z-index: 2 !important; /* Active keys always on top of other keys */
|
144 |
}
|
145 |
.white-key.active {
|
146 |
background: linear-gradient(to bottom, #d5d5d5, #c2c2c2);
|
|
|
289 |
keyElement.classList.add('black-key');
|
290 |
// Position black key centered over the "crack" of the preceding white key
|
291 |
// currentWhiteKeyVisualOffset is the right edge of the *previous* white key
|
292 |
+
keyElement.style.left = (currentWhiteKeyVisualOffset - (BLACK_KEY_WIDTH_PX / 2) - (WHITE_KEY_OVERLAP_PX / 2) - 5) + 'px';
|
293 |
keyElement.style.top = '0px';
|
294 |
} else { // White key
|
295 |
keyElement.classList.add('white-key');
|