<div id="create-div">
<form action="./create.do" method="post">
<input type="text" name="id" placeholder="学号(必填)"><br>
<input type="text" name="name" placeholder="名字(必填)"><br>
<input type="text" name="grade" placeholder="分数(必填)"><br>
<input type="radio" name="gender" value="MALE" >男
<input type="radio" name="gender" value="FEMALE">女<br><br>
<input type="submit" value="提交">
<input type="reset" value="重置">
</form>
</div>
可以 input[type=“xxx”] { … } 设置
同样也可以 input[type=“radio”]:checked 这样设置选中样式。
input[type="text"] {
background-color: #fff;
border: 1px solid rgba(0,0,0,.15);
padding-left: 1em;
width: 23em;
height: 2.8em;
margin-bottom: 1.2em;
}
input[type="radio"] {
width: 1.2rem;
height: 1.2rem;
background-color: #ffffff;
border: solid 1px #dddddd;
-webkit-border-radius: 0.6rem;
border-radius: 0.6rem;
font-size: 0.8rem;
padding: 0;
position: relative;
display: inline-block;
vertical-align: top;
cursor: default;
-webkit-appearance: none;
}
input[type="radio"]:checked {
background-color: #04c9e8;
border: solid 1px #00adc8;
box-shadow: 0 1px 1px rgba(0,0,0,.1);
text-align: center;
background-clip: padding-box;
}
input[type="submit"], input[type="reset"] {
background-color: #007bff;
color: #fff;
font-weight: 400;
font-size: .86em;
border-radius: .3rem;
width: 10em;
height: 3em;
margin-bottom: 1.2em;
margin-left: 1em;
margin-right: 1em;
}
同样也可以 input[type=“radio”]:checked 这样设置选中样式。