CSS 3之美化表格样式(二)

美化表格样式(二)

1. 美化提交按钮

在定义表单元素边框时,可采用 border-styleborder-widthborder-color及其衍生属性;
若要对表单元素设置背景色,可采用 background-color 属性,其中将值设置为 transparent(透明色)是最常用的一种方式;
代码如下所示:

background-color:transparent;	/*背景透明色*/

例子 1:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>表单元素边框设置</title>
		<style type="text/css">
			form{
				margin: 0px;
				padding: 0px;
				font-size: 16px;
			}
			input{
				font-size: 16px;
				font-family: 楷体;
			}
			.n{
				border-bottom: 1px solid #006;
				color:#006 ;
				border-top: 0px;
				border-left: 0px;
				border-right: 0px;
				background-color: transparent;
			}
			.m{
				background-color: transparent;
				border: 1px;
			}
		</style>
	</head>
	<body>
		<center>
			<h2>签到表</h2>
			<form action="" method="post">
				签到:<input id="name" class="n" />
				<input type="submit" value="提交" class="m" />
			</form>
		</center>
	</body>
</html>

20220513

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值