如何在 Mobile Safari/iPad 中设置表单选择框的宽度?
我正在开发一个基于 Web 的菜单应用程序,专门针对 iPad 上的 Mobile Safari(换句话说,我根本不关心跨浏览器兼容性)。我有一个表单选择框,其中包含用户可以选择的多个选项来修改其订单,单击这些选项后,iPad 上将显示如下: 屏幕截图
问题是这个框不够宽,无法向用户显示价格,甚至几个选项的全名。在这种情况下,较小的名字并不是特别有吸引力的选择。有什么方法可以a.)设置此框的宽度(如果它是移动Safari特定的解决方案并不重要!)或b.)使该框变宽以适应最宽的选项?除了一个没有有用答案的论坛帖子之外,我在 Google 上找不到任何可以解决我的问题的内容。
如果需要,Javascript 是一个选项。
谢谢!
I am developing a web-based menu application targeted solely for Mobile Safari on the iPad (in other words, I am not at all concerned about cross-browser compatability). I have a form select box which contains a number of options the user can choose from to modify their order, which when clicked displays on the iPad as follows: Screenshot
The problem is that this box is not wide enough to show the user the price or even the full name for several options. Smaller names is not a particularly attractive option in this case. Is there any way in which I can either a.) set the width of this box (doesn't matter if it's a Mobile Safari-specific solution!) or b.) make it so that the box grows wider to accommodate the widest option? I can find nothing on Google that deals with my question save for one forum thread with no useful answers.
Javascript is an option, if necessary.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,我相信 UIKit 完全与弹出窗口有关。我可以建议的唯一建议是仅用 JavaScript 来实现它。我快速谷歌了一下,没有发现任何比现有的更突出的东西。
To the best of my knowledge I believe UIKit entirely with the popup. The only advice I could suggest would be to implement it solely in JavaScript. I've had a quick Google and nothing is coming up that stands out as a existing one.