-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjavascript.html
More file actions
32 lines (31 loc) · 1.03 KB
/
javascript.html
File metadata and controls
32 lines (31 loc) · 1.03 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>class links</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bitcount+Prop+Single+Ink:wght@100..900&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head>
<body>
<p id="balloon">🎈</p>
<script>
let ballonEl = document.getElementById("ballon")
let fontSize = 10;
ballonEl.style.fontSize = fontSize + "px";
function handeKeyDown(event) {
if (event.key == "ArrowUp") {
fontSize * 1.1;
ballonEl.style.fontSize = fontSize + "px";
event.preventDefault();
}
if (event.key == "ArrowDown") {
fontsize /= 1.1;
event.preventDefault();
}
}
winow.addEventListener("keydown", handleKeyDown);
</script>
</body>