我问这个问题是因为用户在文本区域输入的文本与其他字段不同。字体样式也不同。我如何更改此字段区域的字体样式?首先我想解决这个问题,然后如果样式可以,我想学习如何更改。
.contact-form {
background-color: white;
}
input,
select,
textarea {
background-color: #f2f2f2;
display: block;
margin: auto;
font-size: 1em;
padding: 25px;
border: none;
outline: none;
margin-top: 20px;
margin-bottom: 16px;
box-sizing: border-box;
resize: vertical;
}
input[type=submit] {
font-family: avenir_nextdemi_bold;
background-color: #437bff;
font-size: 1.2em;
color: white;
padding: 12px 20px;
border-radius: 30px;
width: 15%;
border: none;
cursor: pointer;
}
input[type=submit]:hover {
background-color: #133edb;
}
::placeholder {
font-family: avenir_nextdemi_bold;
}
textarea {
height: 200px;
}
<form action="/action_page.php">
<input type="text" id="lname" name="lastname" placeholder="Naam" required>
<input type="email" id="email" name="email" placeholder="Email adres" required>
<textarea id="subject" name="subject" placeholder="Vertel ons over je project" required></textarea>
<input type="submit" value="Submit">
</form>
1条答案
按热度按时间wlp8pajw1#
您需要做的就是添加font-family:无衬线下面是它在代码中的样子: