简体   繁体   English

在iPhone上查看时,如何使我的桌面选择列表像ios选择器一样工作?

[英]How to make my desktop select list behave like a ios picker when viewed on iphone?

I have a dropdown list like this: 我有一个像这样的下拉列表: 在此处输入图片说明

Can I make it behave like this when viewed on iphone? 在iPhone上观看时,可以使它表现得像这样吗?

在此处输入图片说明

I'm using bootstrap 3, any suggestions?? 我正在使用bootstrap 3,有什么建议吗?

Thanks in advance! 提前致谢!

Short answer: No you can not automatically create a Select field in Desktop like on iOS because the select field on mobile uses the native mobile OS implementation. 简短答案:不,您无法像在iOS上那样在Desktop中自动创建一个Select字段,因为移动设备上的select字段使用本机移动OS实施。 So Bootstrap won't help you here at this point. 因此,Bootstrap目前不会在这里为您提供帮助。

Long answer: You could try to recreate the select field on desktop with CSS and JavaScript. 长答案:您可以尝试使用CSS和JavaScript在桌面上重新创建选择字段。 jQuery UI Selectmenu ( https://jqueryui.com/selectmenu/ ) allows you to create custom select dropdown fields which you could style via CSS. jQuery UI Selectmenu( https://jqueryui.com/selectmenu/ )允许您创建可通过CSS设置样式的自定义选择下拉字段。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM