html搜索框正常是怎么制作的
这样,大佬们用的是什么样的方式制作的
示例百度的搜索框怎么制作的,上面的相机是怎么放上去的。我看了代码,是这样的
我把百度上的基本摘下来,去掉了不需要的和不显示的部分,变成了这样
处于左上方,相机用图片代替,调试后转到了“百度一下”的前面
之前不是说了,容器relative定位,那个图片absolute定位,记得采纳。。
<style>
#container{position:relative;display:inline-block;}
#container a{cursor:pointer;position:absolute;background:url(https://ss1.bdstatic.com/5eN1bjq8AAUYm2zgoY3K/r/www/cache/static/protocol/https/soutu/img/camera_new_5606e8f.png) no-repeat;display:block;height:16px;width:18px;right:3px;top:3px}
#container a:hover{background-position:0 -20px}
</style>
<div id="container">
<input type="text" /><a> </a>
</div>