使用CSS重置样式输入类型
输入类型按钮可以是提交按钮或重置按钮。使用CSS,我们可以设置网页上任何按钮的样式。
您可以尝试运行以下代码来设置输入类型按钮的样式:
示例
<!DOCTYPE html>
<html>
<head>
<style>
input[type = submit], input[type = reset] {
background-color: orange;
border: none;
text-decoration: none;
color: white;
padding: 20px 20px;
margin: 20px 20px;
cursor: pointer;
}
</style>
</head>
<body>
<p>Fill the below form,</p>
<form>
<label for = "subject">Subject</label>
<input type = "text" id = "subject" name = "sub"><br><br>
<label for = "student">Student</label>
<input type = "text" id = "student" name = "stu"><br>
<input type = "reset" value = "Reset">
<input type = "submit" value = "Submit">
</form>
</body>
</html>热门推荐
10 朋友新工作祝福语简短
11 简短经典的祖国祝福语
12 牛年公司新年祝福语简短
13 送姐姐的话祝福语简短
14 退伍祝福语老师简短
15 简短的古文春节祝福语
16 答谢生子祝福语简短独特
17 朋友聚会结束祝福语简短
18 简短元旦祝福语古言