我正在移动网站上工作,右边有多个带有背景的输入字段,我已经添加了相同的下面的css代码
.row input
{
width:100%;
padding:10px;
padding-right:30px;
font-size:18px;
background-repeat:no-repeat;
}
.row input.name
{
background:url(/images/mobile_default/icons/name_off.gif) no-repeat right 13px center;
margin-right:10px;
border-bottom:1px solid #f0f0f0;
}
以下HTML为相同的
<div class="row last">
<input name="ccname" placeholder="Name on Card" validate="name" class="name validate" type="text" autocomplete="on"/>
</div>
在原生Android浏览器上,它会查看所有输入区域的重复背景。
如果我在某个地方弄错了,请告诉我。
答案 0 :(得分:1)
我注意到你的css中有错误
.row input.name{background:url(/images/mobile_default/icons/name_off.gif) no-repeat right 13px center;margin-right:10px;border-bottom:1px solid #f0f0f0;}
背景CSS中的背景位置应仅使用左或右,然后使用顶部或底部值。有一个值太多了。
.row input.name{background:url(/images/mobile_default/icons/name_off.gif) no-repeat right center;margin-right:10px;border-bottom:1px solid #f0f0f0;}