HTML实现搜索框

菜鸟教程的搜索框

经过这几天的学习,想实现一下菜鸟教程的搜索框,一看怎么简单的搜索框,我看源码应该很好实现吧,自信地翻开源码,为什么会有两个input标签而页面上却显示一个搜索框,你们知道的可以在底下留言。

HTML

<div class="search">
	<form action="//www.runoob/" target="_blank">
    	<input class="placeholder" placeholder="   搜索……">
	</form>
</div>

CSS


.search{
	width: 449px;
	height: 46px;
	background:#eeefed;
	border:1px solid #eeefed;
	border-radius:3px;
}
.placeholder{
	border:1px solid #c8c8c8;
	border-radius:3px;
	margin-left: 2px;
	margin-top: 5px;
	padding:0px;
	width: 445px;
	height: 36px;
	color:#e4e4e7;
}

效果图

输入框代码格式

<form>
.
input 元素
.
</form>

更多推荐

HTML实现搜索框