实例代码:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
input[type=text] {
background-color:yellow;
width:150px;
display:block;
margin-bottom:10px;
}
input[type=button]{
width:120px;
display:black;
margin-left:35px;
}
</style>
</head>
<body>
<h1>添加表单样式</h1>
<form target="get" accept="" name="input">
Firstname:
<input type="text" value="Bill"></input>
Lastname:
<input type="text" value="Gates"></input>
<input type="button" value="Example button"></input>
</form>
</body>
</html>
运行效果:
评论