1
这就是我的输入和按钮的样子。 CSS代码如下所示:
button._searchfrontpage
{
margin: 0 auto;
background: #333;
height: 53px;
width: 70px;
border-radius: 6px;
line-height: normal;
color: #eee;
font-weight: 400;
letter-spacing: 2px;
border: 0px;
display: block;
font-size: 18px;
}
.sp-module_searchfrontpage input[type="text"] {
background: #f0dbc5;
height: 53px;
width: 50%;
margin: 0 auto;
border-radius: 6px;
margin-bottom: 40px;
line-height: normal;
color: #444;
font-weight: 400;
letter-spacing: 2px;
border: 0px;
display: block;
}
我不似乎想出一个办法来拖动灰色按钮进入我的输入框的右侧。有没有人可以想到我的想法?
编辑:执行代码之后@Jai给了我,它看起来不错,但是当我让浏览器更小,它得到了它的地方,看起来像这样:
显然它像那是因为输入宽度是50%。有没有解决方案?
哎@Jai。感谢您的回复。我不知道为什么,由于某种原因,顶部和右侧不起作用。但不知何故输入和按钮是在同一条线上,但是,如果正确的是0,那么该按钮是向右侧,并且如果合适的是1,那么该按钮是一路到屏幕的左侧。我不知道它为什么这样做? – Peter
@Peter看到0是有效的,但其他值应该与px一起分配。所以这应该是1px的不是1 – Jai
感谢我的请求检查的第一篇文章,我有截图编辑它,你知道,除了改变“宽”我从输入%至固定像素任何修复? – Peter