html的搜索框代码:1、在dw中创建一个input框和button按钮。2、分别为input框和button按钮设置样式即可。
1、在dw中创建一个input框和button按钮,将它们摆放在同一排,代码如下:
<!DOCTYPEhtml>
<html>
<head>
<metacharset="utf-8">
<title>demo</title>
</head>
<body>
<inputtype=""name=""id=""value=""/><button>搜索</button>
</body>
</html>
2、首先为input框添加“#7FCC0B”颜色的边框,并设置宽度和高度,再给button按钮设置白色的字体和“#7FCC0B”的背景颜色即可,代码如下:
<styletype="text/css">
input{
width:180px;
height:30pox;
border:1pxsolid#7FCCOB;
border-right:none;
border-radius:4px;
}
button{
position:relative;
right:2px;
width:50px;
height:35px;
font-size:14px;
color:white;
backgrounf:#7FCC0B;
border:0;
border-radius:4px;
</style>
</head>


发表评论
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。