利用css制作搜索框输入内容直接跳转到百度搜索的内容

html-css015

利用css制作搜索框输入内容直接跳转到百度搜索的内容,第1张

<form action="http://www.baidu.com/baidu" target="_blank">

<div align="center">

<img src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/search/img/baidulogo_clarity_80_29.gif" alt="Baidu" border="0" align="bottom"><input type=text name=word size=30>

<input type="submit" value="百度搜索">

</div>

</form>

把代码放在<body></body>标签之间运行一下。

<button class="btn">搜 索</button>

css:

.btn {

background: url(btn.gif) no-repeat

height: 32px

width: 80px

text-align: center

cursor: pointer

line-height: 32px

color: #FFFFFF

font-weight: bold

border:none

}