表单美化+html+css
参考博客:http://www.laozuo.org/3495.html
美化结果:
美化代码:
<!doctype html>
<html class="">
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style type="text/css">
.elegant-aero {
margin-left:auto;
margin-right:auto;
max-width: 500px;
background: #D2E9FF;
padding: 20px 20px 20px 20px;
font: 12px Arial, Helvetica, sans-serif;
color: #666;
}
.elegant-aero h1 {
font: 24px "Trebuchet MS", Arial, Helvetica, sans-serif;
padding: 10px 10px 10px 20px;
display: block;
background: #C0E1FF;
border-bottom: 1px solid #B8DDFF;
margin: -20px -20px 15px;
}
.elegant-aero h1>span {
display: block;
font-size: 11px;
}
.elegant-aero label>span {
float: left;
margin-top: 10px;
color: #5E5E5E;
}
.elegant-aero label {
display: block;
margin: 0px 0px 5px;
}
.elegant-aero label>span {
float: left;
width: 20%;
text-align: right;
padding-right: 10px;
margin-top: 10px;
font-weight: bold;
}
.elegant-aero input[type="text"], .elegant-aero input[type="email"], .elegant-aero textarea, .elegant-aero select {
color: #888;
width: 70%;
padding: 0px 0px 0px 5px;
border: 1px solid #C5E2FF;
background: #FBFBFB;
outline: 0;
-webkit-box-shadow:inset 0px 1px 6px #ECF3F5;
box-shadow: inset 0px 1px 6px #ECF3F5;
font: 200 12px/25px Arial, Helvetica, sans-serif;
height: 30px;
line-height:15px;
margin: 2px 6px 16px 0px;
}
.elegant-aero textarea{
height:100px;
padding: 5px 0px 0px 5px;
width: 70%;
}
.elegant-aero select {
background: #fbfbfb url('down-arrow.png') no-repeat right;
background: #fbfbfb url('down-arrow.png') no-repeat right;
appearance:none;
-webkit-appearance:none;
-moz-appearance: none;
text-indent: 0.01px;
text-overflow: '';
width: 70%;
}
.elegant-aero .button{
padding: 10px 30px 10px 30px;
background: #66C1E4;
border: none;
color: #FFF;
box-shadow: 1px 1px 1px #4C6E91;
-webkit-box-shadow: 1px 1px 1px #4C6E91;
-moz-box-shadow: 1px 1px 1px #4C6E91;
text-shadow: 1px 1px 1px #5079A3;
}
.elegant-aero .button:hover{
background: #3EB1DD;
}
.btrr {
text-align: center;
}
</style>
</head>
<body>
<div class="">
<form action="" method="post" class="elegant-aero">
<h1 class="elegant-aero h1">信息完善
<span class="elegant-aero h1>span">请完善下面的信息(注意:一旦提交不可更改!)</span>
</h1>
<label class="elegant-aero label">
<span>用户:</span>
<select name="selection" >
<option value="Job Inquiry">学生</option>
<option value="General Question">老师</option>
</select>
</label>
<label class="elegant-aero label">
<span>编号:</span>
<input id="sno" type="text" name="sno" placeholder="请输入要绑定的学号/教职工号" />
</label>
<table>
<tr class="btrr">
<td width="489">
<input type="submit" class="button" value="提交" />
</td>
</tr>
</table>
</form>
</div>
</body>
</html>