-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQ1.html
More file actions
67 lines (66 loc) · 1.71 KB
/
Q1.html
File metadata and controls
67 lines (66 loc) · 1.71 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<html>
<head>
<title>實作:開關燈練習(Q1:開關)</title>
<style>
.button {
margin-left: 10px;
display: inline-block;
padding: 45px 25px;
font-size: 24px;
cursor: pointer;
text-align: center;
text-decoration: none;
outline: none;
color: #fff;
background-color: #1E90FF;
border: none;
border-radius: 15px;
box-shadow: 0 9px #999;
}
.button:hover {background-color: #3e8e41}
.button:active {
background-color: #3e8e41;
box-shadow: 0 5px #666;
transform: translateY(4px);
}
.div {
margin-left: 10px;
padding: 25px 32px;
font-size: 24px;
text-align: center;
color: #fff;
background-color: #1E90FF;
border-style: solid;
border-color: #4bacf2;
border-width: 7px;
}
</style>
<script type="text/javascript" src="myscript.js"></script>
</head>
<body>
<div style="text-align: center;margin-top:150px;">
<h1 >請輸入關燈時間!</h1>
<input type="text" id="input">
<button class="time" onclick="setTiming()"> 確定 </button>
<table style="margin:0px auto;padding: 10px;border:2px solid;border-color:#1E90FF">
<tbody>
<tr>
<td rowspan="2">
<!--- 照片 -->
<img id="image" src="img/on.jpg" width="400" height="300">
</td>
<td>
<!--- 倒數計時器 -->
<div class="div" id="timer"></div>
</td>
</tr>
<tr>
<td>
<!--- 開關燈按鈕 -->
<button class="button" onclick="toggleLight();">ON<br>-<br>OFF</button></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>