css样式表设置表单文本框样式

发布时间:2021-01-04编辑:脚本学堂
本文介绍了css设置文本框样式的例子,表单或输入框、按钮、表格样式设置方法,美化表单中的输入框以及按钮的,需要的朋友参考下。

例了,文本框样式设置。:
 

复制代码 代码示例:
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>css样式表_文本框样式设置</title>
<meta http-equiv="content-type"
content="text/html; charset=iso-8859-1" />
<style>
form {
border: 1px dotted #aaaaaa;
padding: 3px 6px 3px 6px;
}
input.txt{
color: #00008B;
background-color: #ADD8E6;
border: 1px inset #00008B;
width: 200px;
}
input.btn {
color: #00008B;
background-color: #ADD8E6;
border: 1px outset #00008B;
padding: 2px 4px 2px 4px;
}
</style>
</head>
<body>
<form method="post" action="fields.html">
<p>欢迎来到语句网 www.yuju100.com
<br /><input type="text" name="name" id="name" class="txt" /></p>
<p><input type="submit" name="btnSubmit" id="btnSubmit" value="Submit" class="btn" /></p>
</form>
</body>
</html>