利用表格布局编写程序设计“登录界面”
代码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>登录界面</title>
</head>
<body>
<form >
<fieldset style="width:300px;height:230px;margin:0 auto;">
<legend align="center">登录界面</legend>
<p align="center">用户名:<input type="text" maxlength="25"></p>
<p align="center">密 码:<input type="password" maxlength="25"></p>
<p align="center">类型:<input type="radio" name="user">管理员 <input type="radio" name="user">普通用户</p>
<p align="center"><input type="checkbox">记住密码 <input type="checkbox">自动登录</p>
<p align="center"><input type="submit"> <input type="reset"></p>
</fieldset>
</form>
</body>
</html>
运行结果:
采用表格布局完成“CASIO计算机”外观设计
其中表格的每一个单元格均需要设计带边框
代码如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>计算机布局</title>
</head>
<body>
<table width="400"border="2px"cellpadding="0"cellspacing="0"bgcolor="#ffc0cd">
<tr>
<td width="400"valign="middle"align="left"><img src="img/acc.bmp"/></td>
</tr>
<tr>
<td width="400"valign="middle"align="left"><br/><br/><br/></td>
</tr>
<table width="400"border="2px"cellpadding="10px"cellspacing="24px"bgcolor="#ffc0cd">
<tr>
<td width="70"align="center"border="3">1</td>
<td width="70"align="center"border="3">2</td>
<td width="70"align="center"border="3">3</td>
<td width="70"align="center"border="3">+</td>
</tr>
<tr>
<td width="70"align="center"border="3">4</td>
<td width="70"align="center"border="3">5</td>
<td width="70"align="center"border="3">6</td>
<td width="70"align="center"border="3">-</td>
</tr>
<tr>
<td width="70"align="center"border="3">7</td>
<td width="70"align="center"border="3">8</td>
<td width="70"align="center"border="3">9</td>
<td width="70"align="center"border="3">*</td>
</tr>
<tr>
<td width="70"align="center"border="3">0</td>
<td width="70"align="center"border="3">=</td>
<td width="70"align="center"border="3">CE</td>
<td width="70"align="center"border="3">/</td>
</tr>
</table>
</table>
</body>
</html>
运行结果如下:
标签:界面,表格,登录,代码,布局,表单,nbsp,编写 From: https://blog.csdn.net/2301_80756005/article/details/142613760