forked from t11003/w4-git-practice
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
101 lines (87 loc) · 1.84 KB
/
Copy pathstyle.css
File metadata and controls
101 lines (87 loc) · 1.84 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/* ============================
W4 練習 Chatbot 樣式
學生練習:修改顏色、字體大小等
============================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: 'Noto Sans TC', sans-serif;
/* 練習:把背景色改成你喜歡的顏色 */
background-color: #f0f4f8;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.container {
background: white;
border-radius: 16px;
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
width: 480px;
max-width: 95vw;
overflow: hidden;
}
header {
/* 練習:把標題列顏色從藍色改成其他顏色 */
background: #1a3a6b;
color: white;
padding: 20px 24px;
}
header h1 { font-size: 20px; }
header .subtitle { font-size: 13px; opacity: 0.85; margin-top: 4px; }
#chat-box {
height: 360px;
overflow-y: auto;
padding: 20px;
display: flex;
flex-direction: column;
gap: 12px;
}
.message {
max-width: 75%;
padding: 10px 14px;
border-radius: 12px;
font-size: 14px;
line-height: 1.5;
}
.message.bot {
background: #f0f4f8;
color: #333;
align-self: flex-start;
border-bottom-left-radius: 4px;
}
.message.user {
/* 練習:把使用者訊息顏色從綠色改成你喜歡的顏色 */
background: #4caf87;
color: white;
align-self: flex-end;
border-bottom-right-radius: 4px;
}
.input-area {
display: flex;
padding: 16px;
gap: 10px;
border-top: 1px solid #eee;
}
.input-area input {
flex: 1;
padding: 10px 14px;
border: 1px solid #ddd;
border-radius: 8px;
font-size: 14px;
outline: none;
}
.input-area input:focus {
border-color: #1a3a6b;
}
.input-area button {
background: #e84393; /* 粉色按鈕 */
color: white;
border: none;
padding: 10px 20px;
border-radius: 8px;
cursor: pointer;
font-size: 14px;
}
.input-area button:hover {
opacity: 0.85;
}