【问题标题】:How to set input type date with 100% width in jQuery Mobile如何在 jQuery Mobile 中设置 100% 宽度的输入类型日期
【发布时间】:2012-09-04 17:14:59
【问题描述】:

我正在使用 jQuery Mobile 1.1.1 开发一个 Web 应用程序,我有兴趣使用 100% 宽度的 <input type="date" />,但是有一个 gap(它应该有箭头的空间被切割了) 在 iOS4 上查看页面时。

有人有解决这个问题的办法吗?

【问题讨论】:

  • jsfiddle 没有显示任何差距。能发个截图或者描述清楚吗?
  • 将reset.css 添加到您的样式中。最好的一个将是 Eric Meyer 的 Reset CSS。应该做修复。 :)
  • @PraveenKumar 我试过使用Eric Meyer's Reset CSS,但问题仍然存在。
  • 哦,好吧... :) 这似乎是一个旋转按钮问题。

标签: javascript jquery ios mobile jquery-mobile


【解决方案1】:

解决此问题的一种可能解决方案是添加以下 CSS 以覆盖默认浏览器 CSS:

input::-webkit-outer-spin-button,  
input::-webkit-inner-spin-button {  
    -webkit-appearance: none;  
    margin: 0;  
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-03
    • 2014-02-28
    相关资源
    最近更新 更多