非常簡單。我試圖調整個別輸入框的大小,但是當我嘗試調整它們的大小(使用類)時,它會調整每個框的大小。不知道什麼是錯的。下面的代碼:單獨的輸入框不會調整大小而不需要調整大小
/* Centre the page */
.body {
margin: 0 auto;
width: 450px;
top: 50px;
background-color: #444;
overflow: hidden;
position: relative;
display: block;
padding: 5px;
}
/* Centre the form within the page */
form {
margin:0 auto;
text-align: center;
}
/* Style the text boxes */
input, textarea {
height:30px;
background:#444;
border:1px solid white;
padding:10px;
font-size:1.4em;
color:white;
font-family: 'Lato', sans-serif;
}
input:focus, textarea:focus {
border:1px solid white;
color: white;
}
#submit {
height: 50px;
cursor: pointer;
}
#submit:hover {
background-color:#005f5f ;
}
.info {
size: 175px;
}
.message {
size: 400px;
}
<div class="body">
\t \t <form method="post" action="../php/index.php">
\t \t <input class="info" name="name" placeholder="What's your name?">
\t \t <input class="info" name="email" type="email" placeholder="What's your email?">
\t \t <textarea class="message" name="message" placeholder="How can I help?"></textarea>
\t \t <input class="info" id="submit" name="submit" type="submit" value="Submit">
\t \t </form>
\t </div>
任何幫助,將不勝感激。我知道代碼很混亂,我一直在嘗試一切,所以我沒有時間清理它。提前致謝!