搜索框简易处理方式
来源:互联网 发布:mysql 查询死锁语句 编辑:程序博客网 时间:2024/04/30 04:41
如图:要做一个由1 2 3部分组成的搜索框,可以参考一下代码:PS:核心计算.search_box .result的width(120px)等于.search_box input.search_input的padding-left的值
Html:
<div class="fr search_box"><input type="text" placeholder="请输入想搜索的内容..." name="keyword" value="" id="search_input" class="search_input"> <div class="arrow"><i class="ico up"></i><i class="ico down"></i></div> <input type="button" onclick="javascript:G.search_result.doSearch();" value="" class="btn_search" /> <div class="result"><span>第1位,共4位</span></div></div>
Css:
.search_box{border: 1px solid #d3d3d3; height: 38px; position: absolute; top: 10px; right: 16px; } .search_box input.search_input{height: 38px; line-height: 38px; padding: 0 120px 0 15px; width: 150px; color: #999; } .search_box .btn_search{background: url(../images/icon/search.png) no-repeat 14px 8px; background-color: #1fa0e2; cursor: pointer; height: 38px; width: 50px; } .search_box .arrow{display: inline-block;margin-left: -4px;}.search_box .ico{border: 1px #d3d3d3 solid;width: 20px;height: 16px;cursor: pointer;margin-right: -2px;}.search_box .up{background: #fff url(../images/icon/arrow_up.png) no-repeat center center;display: block;margin-top: -1px;}.search_box .ico:active{background-color: #E0E1E0;}.search_box .down{background: #fff url(../images/icon/arrow_down.png) no-repeat center center;margin-top: 3px;}.search_box .result{height: 38px;line-height: 38px;color: #999;position: absolute;right: 78px;bottom: 0;width: 120px;text-align: center;}
ps:鉴于个人经验有限,所有观点,如有异议,请直接回复讨论(请勿发表攻击言论)。加入QQ群209952809(需回答问题,答案为csdn);群聊更快解决问题,更happy。
0 0
- 搜索框简易处理方式
- Struts 异常的简易处理方式
- 搜索框输入特殊字符后台的简单处理方式
- 简易管理器(驱动方式)
- 简易语义搜索概念初探
- vue.js仿简易搜索
- 简易的灰度处理
- 简易的灰度处理
- 成绩处理简易版
- 分离数据库、简易数据库连接方式
- mongdb安装方式(最简易)
- 处理下拉框的方式
- 百度搜索结果页面的参数 搜索框提示词搜索方式(rsv_sug2)
- 简易处理自定义QListWidget元素
- 网站遭遇DDOS简易处理
- 简易处理自定义QListWidget元素
- JavaScript的错误简易处理
- C++简易字符串处理类
- 视差容错
- Android studio错误:IllegalArgumentException: Unable to locate adb
- 编程:等式变换
- 竞品分析和产品分析,你究竟搞清楚了么?
- JavaScript 风格指南/编码规范(Airbnb公司版)
- 搜索框简易处理方式
- Oracle ERP 的前世今生
- [Android Studio] Gradle项目中添加JNI生成文件(.so文件)
- 断舍离
- 数学分析笔记-菲赫金哥尔茨-第一卷-绪论
- Guava之ListenableFuture(实现Java异步)
- 接口开发注意事项阶段性总结
- Windows server 2008 R2远程桌面终端连接数的破解
- Java FileOutputStream中向文本文件中写入换行符