点击这里给我发消息 点击这里给我发消息

纯CSS实现固定搜索框

添加时间:2011-9-3
    相关阅读: 建站 HTML CSS
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>IE6 position:fixed bug</title>
<style>
* {
padding:0;
margin:0;
}
#rightform {
text-align:center;
padding:50px;
font:14px/22px Georgia, "Times New Roman", Times, serif;
height:1200px;
background:#ffc;
}
#rightform h1 {
font-family:arial;
background:#e8edef;
height:300px;
line-height:300px;
margin-bottom:200px;
}
#rightform p {
line-height:1.5em;
background:#ffdfff;
padding:90px 0;
}
#rightform form {
background-color:#ddd;
padding:10px 20px;
border:1px solid #aaa;
position:fixed;
right:30px;
top:120px;
}
</style>
<!--[if IE 6]>
<style type="text/css">
html{overflow:hidden;}
body{height:100%;overflow:auto;}
#rightform form{position:absolute;}
</style>
<![endif]-->
</head>
<body>
<div id="rightform">
<h1>
IE6 position:fixed bug
</h2>
<p>position:fixed; vs position:absolute;<br />
by <a href="http://www.jzxue.com/" title="sofish">jzxue.com</a> from <a href="http://www.jzxue.com/" title="blog">建站学</a></p>
<form id="g_search" method="get" action="#">
<input id="g_s" name="g_s" type="text" value=""  />
<input id="g_submit" name="g_submit" type="button" value="search" />
</form>
</div>
</body>
</html> 本文作者:未知
咨询热线:020-85648757 85648755 85648616 0755-27912581 客服:020-85648756 0755-27912581 业务传真:020-32579052
广州市网景网络科技有限公司 Copyright◎2003-2008 Veelink.com. All Rights Reserved.
广州商务地址:广东省广州市黄埔大道中203号(海景园区)海景花园C栋501室
= 深圳商务地址:深圳市宝源路华丰宝源大厦606
研发中心:广东广州市天河软件园海景园区 粤ICP备05103322号 工商注册