代码如下:<html>
<head>
<title>用户登录</title></head>
<style>
#warp{width:1000px;
height:420px;
padding-left:150px;
}
#header{background-color:#2CC212;
width:1000px;
height:120px;
}
#content{width:1000px;
height:230px;
text-align:center;
}
#footer{width:1000px;
height:50px;
text-align:center;
background-color:#CCCCCC;
font-family:楷体;
clear:left;
}
#logo img{width:140px;
height:140px;
}
#words{font-style:italic;
color:white;
font-family:黑体;
font-weight:bold;
padding-left:70px;
padding-top:45px;
}
#logo,#words{float:left;}
#login,#others{width:480px;float:left;padding-top:80px;height:240px;}
#Android img{width:190px;
height:190px;
padding-top:80px;
}
#appstore{width:40px;
height:60px;
background-color:##2CC212;
float:left;
}
</style>
<script type="text/javascript">
function check()
{
if(document.submit.name.value == '')
{
alert('请输入机身编号!');
}
else if(document.submit.password.value == '')
{
alert('请输入密码!');
}
else
{
//do nothing
}
}
</script>
<body>
<div id="warp">
<div id="header">
<div id="logo"><img src="images/autobox_logo(1).png"></div>
<div id="words"><i><h1>安保特|关怀人 车 家</h1></i></div>
</div>
<div id="content" style="align:center;">
<div id="others">
<div id="android">
<div id="android"><img src="images/Android.jpg"></div>
<div id="download_andrond">下载安卓版</div>
<div id="Autobox">
<div id="color"></div>
<div id="store">App store</div>
</div>
<div id="login">
<fieldset>
<legend>登陆</legend>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" name="submit" method="post">
<lable><b>机身编号</b>:</lable>
<input type="text" name="name"><br /><br />
<lable><b>密 码</b>:</lable>
<input type="password" name="password"><br /><br />
<input type="submit" value="登陆" name="submited" onClick="return check()">
<input type="reset" value="重置">
</form>
</fieldset>
</div>
运行结果如图:
不知如何解决??急!!!
Float浮动去解决;
这个问题解决了吧?
没理解。。问的是什么- -