html代码
<form action="http://www.baidu.com/baidu" target="_blank">
<div class="form">
<a href="http://www.baidu.com/"><img src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-80px.gif" alt="Baidu" align="bottom" border="0"></a>
<tr>
<td>
<input name=tn type=hidden value=baidu/>
<input type="text" value="张子枫" name=word size=30/>
<input type="submit" value="百度一下"/>
</td>
</tr>
</div>
</form>
css代码
<style type="text/css" >
.form{
position:absolute;
width:600px;
margin-top:10%;
margin-left:40%;
}
源代码
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>input</title>
<style type="text/css" >
.form{
position:absolute;
width:600px;
margin-top:10%;
margin-left:40%;
}
</style>
</head>
<body>
<form action="http://www.baidu.com/baidu" target="_blank">
<div class="form">
<a href="http://www.baidu.com/"><img src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-80px.gif" alt="Baidu" align="bottom" border="0"></a>
<tr>
<td>
<input name="tn" type=hidden value=baidu/>
<input type="text" name=word value="张子枫" size=30/>
<input type="submit" value="百度一下"/>
</td>
</tr>
</div>
</form>
</body>
</html>
###运行结果