CSS漂亮搜索框美化代码
效果图:
实现这种效果有两种⽅法:⼀是整体处理⼀个背景,以透明gif图的⽅式定位到搜索框,或者切分开,这种⽅法加载快,⽽且灵活性更⾼。 ⽂中⽤到的图⽚
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<html xmlns="/1999/xhtml"xml:lang="en"lang="en">
<head>
<meta http-equiv="Content-Type"content="text/html; charset=gb2312"/>
<title>CSS美化的漂亮搜索框</title>
<style type="text/css">
body{
font: normal 100% 'Arial','Helvetica','Verdana',sans-serif;
color: #333;
}
p {
padding: 12px 0;
margin: 0;
font-size: .8em;
line-height: 1.5;
}
form {
margin: 0;
}
#search_box {
width: 201px;
height: 31px;
url(http: //files.jb51/demoimg/200912/bg_search_box.gif);
}
#search_box #s {
float: left;
padding: 0;
margin: 6px 0 0 6px;
border: 0;
width: 159px;
background: none;
font-size: .8em;
}
#search_box #go {
float: right;
margin: 3px 4px 0 0;
}
</style>
</head>
<body>
好看的css代码<div id="search_box">
<form id="search_form"method="post"action="#">
<input type="text"id="s"value="Search"class="swap_value"/>
<input type="image"src="files.jb51/demoimg/200912/btn_search_box.gif"width="27"height="24"id="go"alt="Search"title ="Search"/>
</form>
</div>
</body>
</html>
from
本⽂转⾃ yeybz 51CTO博客,原⽂链接:blog.51cto/hmlwl/1168096
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论