Tag: htmlinput

在iPhone iOS / Safari上显示HTMLinputtypes编号的缺陷

我想在移动应用程序上使用HTMLinputtypes=“数字”,以便向智能手机(Android,iPhone和其他)表明数字键盘比用户更感兴趣。 这很好。 所以,我在这里有这段HT​​ML: <h3>type="number"</h3> <input type="number" class="input-number"/> <h3>type="text"</h3> <input type="text" class="input-text"/> 这里应用的重要的CSS元素是: input { height: 2em; padding: 0.2em 0.5em; width: 100%; /* avoid iPhone rounded corners */ border: 1px solid #afb7c1; border-collapse: collapse; border-radius: 0 0 0 0; } .input-number { text-align: right; } 应该这样渲染: 以上是来自iOS 4.1的截图,世界还在。 在Android手机上,一切正常。 但看看在iOS 4.2,4.3上发生了什么: 突然之间,这个数字字段的宽度有点小,就好像iPhone想要在inputtype =“number”时为某些浏览器上出现的无用微调器腾出空间。 有谁知道这样的问题? 你怎么修好它的? 或者解决它? […]