鱼C论坛

 找回密码
 立即注册
查看: 3582|回复: 2

[已解决]我用html设计的搜索框,感觉右边的搜索不是一个按钮,请大神指教一下

[复制链接]
发表于 2017-5-7 14:51:16 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
<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>
最佳答案
2017-5-7 15:00:27
本帖最后由 alltolove 于 2017-5-7 15:02 编辑

把那个搜索的<div>标签换成<input type='button'>或者<a href="javascript:void(0)">就行了
1.png
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2017-5-7 15:00:27 | 显示全部楼层    本楼为最佳答案   
本帖最后由 alltolove 于 2017-5-7 15:02 编辑

把那个搜索的<div>标签换成<input type='button'>或者<a href="javascript:void(0)">就行了
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2017-5-8 07:26:48 From FishC Mobile | 显示全部楼层
alltolove 发表于 2017-5-7 15:00
把那个搜索的标签换成或者就行了

已解决
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-4-26 20:48

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表