div css 练习1

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>无标题文档</title>
<style>
	body{
		margin: 0px;
		padding:0px;
		font-size:12px;
		background:#252525;
		overflow:hidden;						
		text-align:center;		
	}
	
	#container{
		/*width:980px;
		height:100px;
		border: 1px solid red; */
		text-align:center;
	}
	
	#login{
		background-image:url(image/lgonin_background.png);
		width:960px;
		height:404px;
		text-align:center;
		margin-left:auto;
		margin-right: auto;	
	}
	
	#form1 {
		margin-top:100px; 
		padding-top:100px;
	}
	
	#input div{
		margin-bottom:5px;		
	}
	
	#input div input{
		width:150px;
		height:20;		
		border:0px;
	}	
	
</style>
</head>

<body>
	<div id="container">
		<div id="login">
			<div id="form1">
				<form action="http://www.baidu.com" method="post">
					<div id="input">
					<div>用户:<input type="text" name="username" /><br /> </div>
					<div>密码:<input type="password" name="passwd" /><br /></div>
					</div>
					<div id="button">
					<input type="submit" value="登录" />
					<input type="button" value="注册" onclick="window.location.href='register.html'"  />
					</div>
				</form>
			</div>
		</div>
	</div>
</body>
</html>

posted @ 2013-11-24 13:58  今晚打酱油_  阅读(132)  评论(0编辑  收藏  举报