Skip to content

Commit 1dc83b9

Browse files
committed
fix: resolve form button layout
1 parent 37e2a8f commit 1dc83b9

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

index.css

+4-5
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
}
230230

231231
button {
232-
/* width: auto; */
232+
width: auto;
233233
height: 42px;
234234
font-size: 20px;
235235
margin-bottom: 10px;
@@ -742,21 +742,20 @@
742742
margin: 0 auto;
743743
margin-block-start: 40px;
744744

745-
width: 416px;
745+
max-width: 416px;
746+
width: 100%;
746747
height: 56px;
747748
background-color: var(--button-bg);
748749
color: #fff;
749-
750750
font-size: 16px;
751751
line-height: 24px;
752-
753752
border: none;
754753
}
755754

756755
& button:hover {
757756
cursor: pointer;
758757
transition: all 0.5s ease-in-out;
759-
transform: scale(1.3);
758+
transform: scale(1.1);
760759
}
761760
}
762761
}

index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -166,17 +166,17 @@ <h2>聯絡我們</h2>
166166

167167
<form>
168168
<label for="name">姓名</label>
169-
<input type="text" name="name" id="name" placeholder="姓名" required>
169+
<input type="text" name="name" id="name" placeholder="童話裡的心理學" required>
170170

171171
<label for="phone">聯絡電話</label>
172-
<input type="tel" name="phone" id="phone" placeholder="連絡電話" maxlength="10" pattern="[0-9]{10}"
172+
<input type="tel" name="phone" id="phone" placeholder="0912-345-678" maxlength="10" pattern="[0-9]{10}"
173173
required>
174174

175175
<label for="email">電子郵件</label>
176-
<input type="email" name="email" id="email" placeholder="電子郵件" required>
176+
<input type="email" name="email" id="email" placeholder="[email protected]" required>
177177

178178
<label for="comment">意見反應</label>
179-
<textarea name="comment" id="comment" placeholder="意見反應"></textarea>
179+
<textarea name="comment" id="comment" placeholder="好想出國玩"></textarea>
180180

181181
<div class="agreement">
182182
<input class="check-input" type="checkbox" name="agree" id="agree" value="true">

0 commit comments

Comments
 (0)