创建一个表格,使用类选择器来美化表格样式?

创建一个表格,使用类选择器来美化表格样式:

代码如下:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>创建一个表格,使用类选择器美化</title>
	</head>
	<style>
		/*border-style 设置边框的线是实线
		 border-color 设置边框颜色*/
		a:link{text-decoration: none;font-size: 20px;}
		.table{background: cyan; border-style: solid;border=1;border-color:pink;font-family: "楷体";font-size: medium;}
		.fieldset{width:500px; height: 80; text-align: center; font-size:25px;font-family: "微软雅黑";}
	</style>
	<body>
		<a href="http://www.baidu.com" target="_blank">百度一下,你就知道</a>
		<fieldset class="fieldset"> <legend>新用户注册:</legend>
			<table   align="center" class="table" border= "1">
				<thead align="center">填写个人信息</thead>
				<tbody align="center">
				<tr>
					<th>姓名</th>
					<th><input type="text" name="user"/></th>
				</tr>
				<tr>
					<th>密码</th>
					<th><input type="password" name="ps"/></th>
				</tr>
				<tr>
					<th>性别</th>
					<th><input type="radio" name="sex" value="男" checked="checked"/>男
					<input type="radio" name="sex"value="女"/>女
					</th>
				</tr>
				<tr>
					<th>头像</th>
					<th><input type="file" value="上传头像"/>
					</th>
				</tr>
				<tr>
					<th>爱好</th>
					<th><input type="checkbox" name="hobby" value="篮球" />篮球
					<input type="checkbox" name="hobby" value="跑步"/>跑步
					<input type="checkbox" name="hobby" value="游泳"/>游泳
					<input type="checkbox" name="hobby" value="煲剧"/>煲剧
					<input type="checkbox" name="hobby" value="其他" checked="checked"/>其他
					</th>
				</tr>
					<tr>
					<th>城市</th>
					<th><select>
						<option value="1" selected="selected">请选择城市?</option>
						<option value="2">北京</option>
						<option value="2">上海</option>
						<option value="2">南京</option>
						<option value="2">天津</option>
						<option value="2">四川</option>
					</select>
					</th>
				</tr>
					<tr>
					<th>自我介绍</th>
					<th><textarea>请填写自我介绍,不超过20个字!
					</textarea>
					</th>
				</tr>
				</tr>
					<tr>
					<th colspan="2">
						<input type="submit" value="提交" />
						<input type="reset" value="重置" />
					</th>
					
					</th>
				</tr></tbody>
			</table>
		</fieldset>
		
			
		
		
	</body>
</html>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

熊猫_water

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值