Skip to content

Commit 81dd892

Browse files
authored
Merge pull request #11 from lizwang50/etrex-day3
etrex day3
2 parents 72fd219 + 7720632 commit 81dd892

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Document</title>
7+
<style>
8+
:root {
9+
--size: 0vw;
10+
}
11+
12+
h1 {
13+
margin: 0;
14+
font-size: var(--size);
15+
}
16+
17+
input {
18+
width: 90%;
19+
}
20+
</style>
21+
</head>
22+
<body>
23+
請拖曳:<input type="range" min="0" max="32" value="0" step="0.01"></input>
24+
<h1>怕爆!</h1>
25+
<script>
26+
let input = document.querySelector("input")
27+
input.addEventListener("input", function(){
28+
let size = this.value
29+
document.documentElement.style.setProperty("--size",`${size}vw`);
30+
})
31+
</script>
32+
</body>
33+
</html>

index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
width: 100%;
1313
border: 1px solid #004085;
1414
border-radius: 5px;
15+
margin-top: 10px;
1516
}
1617
.hover-border:after {
1718
content: "";
@@ -34,6 +35,7 @@
3435
<div class="col-md-8">
3536
<h1>慶祝蛋炒飯成功 :D</h1>
3637
<div class="content-border d-flex justify-content-center">
38+
3739
<nav class="nav flex-column my-4">
3840
<a class="nav-link hover-border" href="./Etrex/Day2 - clock/index.html">卡米 der 時鐘</a>
3941
<a class="nav-link hover-border" href="./Liz/Day2 - clock/index.html">栗子 der 時鐘</a>
@@ -42,6 +44,11 @@ <h1>慶祝蛋炒飯成功 :D</h1>
4244
<a class="nav-link hover-border" href="./cindy/Day2-clock/index.html">Cindy der 時鐘</a>
4345
</nav>
4446
</div>
47+
<div class="content-border d-flex justify-content-center">
48+
<nav class="nav flex-column my-4">
49+
<a class="nav-link hover-border" href="./Etrex/Day3 - CSS variable/index.html">卡米 der 怕爆</a>
50+
</nav>
51+
</div>
4552
</div>
4653
</div>
4754
</div>

0 commit comments

Comments
 (0)