1.采用表格布局完成“CASIO计算器”外观设计,其中表格的每一个单元格均需要设计带边框,效果如图:
代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CASIO计算器</title>
</head>
<body>
<table width="400" border="3" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
<tr>
<td width="400" valign="middle" align="left">
<img src="img/casio.bmp" alt="CASIO" style="width:100px;height:auto;">
</td>
</tr>
<tr>
<td width="400" valign="middle" align="left">
<br/><br/><br/>
<table width="400" border="3" cellpadding="10px" cellspacing="24px" bgcolor="#ffffff">
<tr>
<td width="70" align="center" border="1">1</td>
<td width="70" align="center" border="1">2</td>
<td width="70" align="center" border="1">3</td>
<td width="70" align="center" border="1">+</td>
</tr>
<tr>
<td width="70" align="center" border="1">4</td>
<td width="70" align="center" border="1">5</td>
<td width="70" align="center" border="1">6</td>
<td width="70" align="center" border="1">-</td>
</tr>
<tr>
<td width="70" align="center" border="1">7</td>
<td width="70" align="center" border="1">8</td>
<td width="70" align="center" border="1">9</td>
<td width="70" align="center" border="1">*</td>
</tr>
<tr>
<td width="70" align="center" border="1">0</td>
<td width="70" align="center" border="1">=</td>
<td width="70" align="center" border="1">CE</td>
<td width="70" align="center" border="1">/</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
图片放在项目/img/CASIO.bmp:
2.编写程序实现如图所示的“登录页面”:
代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>登录页面</title>
<style type="text/css">
body {
text-align: center;
}
fieldset {
width: 400px;
}
</style>
</head>
<body>
<form>
<fieldset>
<legend>登录页面</legend>
<label>用户名:</label><input name="username" type="text"/><br/>
<label>密 码:</label><input type="password" name="password"/><br/>
<label>类 型:</label>
<input type="radio" name="userType" value="管理员"/>管理员
<input type="radio" name="userType" value="普通用户"/>普通用户<br/>
<input type="checkbox" name="rememberPassword"/>记住密码
<input type="checkbox" name="autoLogin"/>自动登录<br/>
<input type="submit" name="submit" value="提交"/>
<input type="reset" name="reset" value="重置"/>
</fieldset>
</form>
</body>
</html>
标签:章节,表格,登录,表单,CASIO,nbsp,计算器,习题,页面
From: https://blog.csdn.net/KO2131855283/article/details/142596895