使用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 孩子16岁祝福语简短
15 女生成年祝福语简短
16 唯美的祝福语简短的
17 异性朋友简短生日祝福语
18 生日贺卡祝福语 简短独特