【发布时间】:2015-04-21 23:36:40
【问题描述】:
我正在制作一个带有货币前缀的文本框。 我使用以下 CSS
.currencyInput {
position: relative;
}
.currencyInput input {
/*padding-left:18px;*/
padding-left: 25px;
}
.currencyInput:before {
position: absolute;
top: 0;
content:"Rs";
left: 5px;
}
.text-box1{
border:1px solid #31BAF9;
width:-webkit-calc(95% - 11px);
width:calc(95% - 11px);
padding:0 5px;
margin:5px auto;
height:42px;
}
<span class="currencyInput">
<input type="text" class="text-box1" placeholder="Price" value="35750.00"name="price"/>
</span>
此代码在 chrome 中运行良好。 但是当涉及到 Firefox 时,span 数据没有显示。 有什么想法吗?!
【问题讨论】:
-
在 FF 中对我来说很好用。也许清除你的缓存?
-
也在 FF (v37.0.1) 中为我工作。请说明您遇到此问题的 FF 版本。
-
在我的机器上,sn-p 在 FF 中的工作比在 Chrome 中更好。在 Chrome 中,Rs 和数字不在同一基线上。