我用html设计的搜索框,感觉右边的搜索不是一个按钮,请大神指教一下
<html><head>
<meta charset="gb2312">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Examples</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="" rel="stylesheet">
<style type="text/css">
#box{
width: 380px;
margin: 30px auto;
font-family: 'Microsoft YaHei';
font-size: 14px;
}
input{
width: 260px;
border: 1px solid #e2e2e2;
height: 30px;
float: left;
background-image: url(images/search.jpg);
background-repeat: no-repeat;
background-size: 25px;
background-position:5px center;
padding:0 0 0 40px;
}
#search{
width: 78px;
height: 32px;
float: right;
background: black;
color: white;
text-align: center;
line-height: 32px;
cursor: pointer;
}
</style>
</head>
<body>
<div id="box">
<input type="text" name="search" placeholder="请输入关键字"/>
<div id="search">搜索</div>
</div>
</body>
</html> 本帖最后由 alltolove 于 2017-5-7 15:02 编辑
把那个搜索的<div>标签换成<input type='button'>或者<a href="javascript:void(0)">就行了 alltolove 发表于 2017-5-7 15:00
把那个搜索的标签换成或者就行了
已解决
页:
[1]