File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed
Etrex/Day3 - CSS variable Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 1212 width : 100% ;
1313 border : 1px solid # 004085 ;
1414 border-radius : 5px ;
15+ margin-top : 10px ;
1516 }
1617 .hover-border : after {
1718 content : "" ;
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 >
You can’t perform that action at this time.
0 commit comments