简体   繁体   English

如何确保“选择”输入的格式在Mac OS上有效

[英]How do I ensure the formatting for the `select` input works on Mac OS

How do I keep the formatting consistent for my form across all OS's. 如何在所有操作系统上使表单的格式保持一致。

Atm, it is working perfectly fine on Windows, however - I want the select input to have the same formatting on Mac OS and iOS as well as Android phones. Atm,它在Windows上运行良好,但是-我希望select输入在Mac OS和iOS以及Android手机上具有相同的格式。

The image below is the select field within a Safari browser. 下图是Safari浏览器中的select字段。 The same formatting is on a Chrome browser on Mac OS too. Mac OS上的Chrome浏览器也具有相同的格式。

I have attached an image for reference Select Input 我已附加图像以供参考选择输入

From the above image you can see the Contact Number and Name field formatting is the same, however the format changes for Debt Level unfortunately. 在上图中,您可以看到“ Contact Number和“ Name字段的格式相同,但是不幸的是,“ Debt Level的格式已更改。

Every browser has their own styling for native elements like selects. 每个浏览器对于诸如selects之类的本机元素都有自己的样式。 You could try to set your own specific styles on them to override some styles but browsers will ignore most CSS rules on selects. 您可以尝试在其上设置自己的特定样式以覆盖某些样式,但是浏览器将忽略大多数CSS规则。

If you want to have complete power over styling the select, you'll need to implement your own custom version. 如果您希望完全具有选择样式的样式,则需要实现自己的自定义版本。 This outlines what would need to be done: https://css-tricks.com/dropdown-default-styling/#article-header-id-4 这概述了需要做的事情: https : //css-tricks.com/dropdown-default-styling/#article-header-id-4

I cant add a comment, so have to put it as an answer 我无法添加评论,因此必须将其作为答案

if you are using bootstrap, define ui:bootstrap cdn in the script tag. 如果使用引导程序,请在脚本标记中定义ui:bootstrap cdn。

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

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