首页 行业资讯 宠物日常 宠物养护 宠物健康 宠物故事

请问下图的css样式怎么写?搜索框上面有一张背景图片和文字。

发布网友

我来回答

2个回答

热心网友

html部分:
<div class="a"><input type="text" class="a1" /><input type="button" value="搜索" class="a2"></div>

css部分
.a{width:300px; height:30px; background:url(背景图片地址) no-repeat;}
.a1{width:250px;heght:24px; padding:3px; background:none; border:0;}
.a2{width:50px; height:30px; background:none; border:0;}

背景图片应该会做吧!不会再追问!

热心网友

一个文本框跟一个按钮连在一起,
文本框跟按钮float一块就可以了。
按钮可以定义个类 写background蓝色背景图片。
或者把按钮浮在文本框右边也可以。

热心网友

html部分:
<div class="a"><input type="text" class="a1" /><input type="button" value="搜索" class="a2"></div>

css部分
.a{width:300px; height:30px; background:url(背景图片地址) no-repeat;}
.a1{width:250px;heght:24px; padding:3px; background:none; border:0;}
.a2{width:50px; height:30px; background:none; border:0;}

背景图片应该会做吧!不会再追问!

热心网友

一个文本框跟一个按钮连在一起,
文本框跟按钮float一块就可以了。
按钮可以定义个类 写background蓝色背景图片。
或者把按钮浮在文本框右边也可以。

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com