前端自定义搜索框实现详解编程语言
2023-06-13 09:11:47 时间
input type="text" name="s" placeholder="输入关键字搜索" /
button type="button" 搜索 /button
/div
/div
关键代码,样式调整
.site-search{ width:25%; float:right; width:250px; height:50px; #search{ position:relative; margin-top:15px; #search input{ padding-right:30px; #search button{ position:absolute; right:4px; top:2px; border:none; padding:0; width:24px; height:24px; background:url("static/images/search.png") no-repeat scroll right center transparent; direction:ltr; text-indent:-9999em; }
实现效果
项目全部代码在自己的开源项目:https://github.com/u014427391/myblog
17041.html
cjava