搜索框中相关样式

html

<div id="container">
    <div class="search bar6">
        <form>
            <input type="text" placeholder="请输入顾客姓名" name="cname">
            <button type="submit"></button>
        </form>
    </div>

    <div class="search bar7">
        <form>
            <input type="text" placeholder="请输入房号" name="crid">
            <button type="submit"></button>
        </form>
    </div>

    <div class="search bar8">
        <form>
            <input type="text" placeholder="请输入顾客证件号">
            <button type="submit"></button>
        </form>
    </div>
</div>

Css部分

<stlye>
* {
	box-sizing:border-box;
}
body {
	margin:0;
	padding:0;
	background-image:url(ydrzimages/p3.jpg);
	font-weight:500;
	font-family:"Microsoft YaHei","宋体","Segoe UI","Lucida Grande",Helvetica,Arial,sans-serif,FreeSans,Arimo;
}
#container {
	width:500px;
	height:820px;
	margin:0 auto;
}
div.search {
	padding:10px 0;
}
form {
	position:relative;
	width:300px;
	margin:0 auto;
}
input,button {
	border:none;
	outline:none;
}
input {
	width:100%;
	height:42px;
	padding-left:13px;
}
button {
	height:42px;
	width:42px;
	cursor:pointer;
	position:absolute;
}
/*搜索框6*/
     
.bar6 input {
	border:2px solid #c5464a;
	border-radius:5px;
	background:transparent;
	top:0;
	right:0;
}
.bar6 button {
	background:#c5464a;
	border-radius:0 5px 5px 0;
	width:60px;
	top:0;
	right:0;
}
.bar6 button:before {
	content:"搜索";
	font-size:13px;
	color:#F9F0DA;
}
/*搜索框7*/
      
.bar7 form {
	height:42px;
}
.bar7 input {
	width:250px;
	border-radius:42px;
	border:2px solid #324B4E;
	background:#F9F0DA;
	transition:.3s linear;
	float:right;
}
.bar7 input:focus {
	width:300px;
}
.bar7 button {
	background:none;
	top:-2px;
	right:20px;
}
.bar7 button:before {
	content:"Search";
	font-family:FontAwesome;
	color:#324b4e;
}
/*搜索框8*/
       
.bar8 form {
	height:42px;
}
.bar8 input {
	width:0;
	padding:0 42px 0 15px;
	border-bottom:2px solid transparent;
	background:transparent;
	transition:.3s linear;
	position:absolute;
	top:0;
	right:0;
	z-index:2;
}
.bar8 input:focus {
	width:300px;
	z-index:1;
	border-bottom:2px solid #F9F0DA;
}
.bar8 button {
	background:#683B4D;
	top:0;
	right:0;
}
.bar8 button:before {
	content:"Go";
	font-family:FontAwesome;
	font-size:16px;
	color:#F9F0DA;
}
</style>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值