新手求助,为什么提交按钮调成和背景图片一样大小,仍然会超出背景。

[复制链接]
查看11 | 回复8 | 2021-1-27 06:26:33 | 显示全部楼层 |阅读模式








.sousuo{
width:350px;
height:41px;
margin-top:8px;
float:left
}
.sousuotd{
height:41px;
}
.s_z{
width:6px;
background:url(images/s_l.jpg)no-repeat;
}
.s_c{
width:240px;
background:url(images/s_c.jpg);
}
.s_y{
width:78px;
background:url(images/s_r.jpg);
}
input{
width:242px;
height:38px;
border:0
}
button{
width:78px;
height:41px;
background:0;
border:0
}



分 -->
回复

使用道具 举报

千问 | 2021-1-27 06:26:33 | 显示全部楼层
元素都设置padding:0px;margin:0px;

回复

使用道具 举报

千问 | 2021-1-27 06:26:33 | 显示全部楼层
感谢解答。但是我设置过了,开头就设置了*{margin="0";padding="0"},没截出来,怕太长看了眼花。并且我在chrome也检查了,padding和margin值都是0。
回复

使用道具 举报

千问 | 2021-1-27 06:26:33 | 显示全部楼层
试试:
td{vertical-align:top;}
回复

使用道具 举报

千问 | 2021-1-27 06:26:33 | 显示全部楼层
神仙也变不大
回复

使用道具 举报

千问 | 2021-1-27 06:26:33 | 显示全部楼层
跪求帮忙看看
回复

使用道具 举报

千问 | 2021-1-27 06:26:33 | 显示全部楼层
你把背景图设置到button上去
回复

使用道具 举报

千问 | 2021-1-27 06:26:33 | 显示全部楼层
没有设置背景图的大小
回复

使用道具 举报

千问 | 2021-1-27 06:26:33 | 显示全部楼层
background-size:contain或者cover
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行