改变以下html字体: <!DOCTYPE html> <html xmlns=""> <head> <meta charset="UTF-8"> <title>Webmail客户端</title> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; } input[type="email"] { background-color: lightblue; } </style> </head> <body background="R-C.jpg"> <form action="deal_email.php" method="POST"> <h1>邮你真好</h1> <label for="from_email">Sender's Email:</label><br> <input type="email" id="from_email" name="from_email" required size=50 ><br> <label for="passward">Password:</label><br> <input type="password",id = "password" name="password"><br> <label for="to_email">Receiver's Email:</label><br> <input type="email" id="to_email" name="to_email[]" required> <button type="button" id="add_email">Add</button><br> <label for="title">Title</label><br> <input type="text" id="title" name="title" required><br> <label for="email_content">Message:</label><br> <textarea id="email_content" name="email_content" rows="10" cols="50" required></textarea><br><br> <button type="submit">Send Email</button> </form> <script> var addEmailButton = document.getElementById("add_email"); addEmailButton.addEventListener("click", function() { var emailList = document.createElement("input"); emailList.setAttribute("type", "email"); emailList.setAttribute("name", "to_email[]"); emailList.setAttribute("required", ""); document.getElementById("to_email").insertAdjacentElement("afterend", emailList); }); </script> </body> </html>
时间: 2023-07-06 13:26:29 浏览: 201
你可以在上述HTML代码的<style>标签中添加一些CSS样式来修改字体。例如,你可以使用font-family属性来指定字体,font-size属性来指定字号,以及font-weight属性来指定字重。以下是一个例子:
```html
<!DOCTYPE html>
<html xmlns="">
<head>
<meta charset="UTF-8">
<title>Webmail客户端</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
font-family: Arial, sans-serif; /* 指定字体 */
}
h1 {
font-size: 36px; /* 指定字号 */
font-weight: bold; /* 指定字重 */
}
input[type="email"] {
background-color: lightblue;
font-size: 18px;
}
label {
font-size: 20px;
}
textarea {
font-size: 20px;
}
</style>
</head>
<body background="R-C.jpg">
<form action="deal_email.php" method="POST">
<h1>邮你真好</h1>
<label for="from_email">Sender's Email:</label><br>
<input type="email" id="from_email" name="from_email" required size=50 ><br>
<label for="passward">Password:</label><br>
<input type="password",id = "password" name="password"><br>
<label for="to_email">Receiver's Email:</label><br>
<input type="email" id="to_email" name="to_email[]" required> <button type="button" id="add_email">Add</button><br>
<label for="title">Title</label><br>
<input type="text" id="title" name="title" required><br>
<label for="email_content">Message:</label><br>
<textarea id="email_content" name="email_content" rows="10" cols="50" required></textarea><br><br>
<button type="submit">Send Email</button>
</form>
<script>
var addEmailButton = document.getElementById("add_email");
addEmailButton.addEventListener("click", function() {
var emailList = document.createElement("input");
emailList.setAttribute("type", "email");
emailList.setAttribute("name", "to_email[]");
emailList.setAttribute("required", "");
document.getElementById("to_email").insertAdjacentElement("afterend", emailList);
});
</script>
</body>
</html>
```
在这个例子中,我们使用了CSS样式来指定了整个页面的字体为Arial和sans-serif,字号为20像素。我们还使用了不同的字号来调整了不同元素的字体大小,例如输入框和标签的字号为18像素,标题的字号为36像素,而文本框的字号为20像素。你可以根据自己的需求修改这些属性的值。
阅读全文