android - 带有 HTML 选择标签颜色的 iOS9 Cordova 元素

标签 android html css cordova ios9

我正在使用 Cordova 元素。我正在新的 iOS9 中测试它,但我对选择标签的颜色有疑问。在浏览器和 Android 中,一切正常。

HTML代码:

<select id="duration" class="select-sharegames action-button">


<option value="0">Fin de semana
                        <span class="ion-arrow-down-b"></span>
                    </option>
                    <option value="1">Una semana</option>
                    <option value="2">Dos semanas</option>
                    <option value="3">Un mes</option>
                    <option value="4">Otra...</option>
</select>

CSS 代码:

.action-button {
  display: inline-block;
  width: 100%;
  height: 51px;
  padding: 12px;
  border-radius: 2px;
  background-color: #4fd2c2;
  color: white;
  font-size: 12px;
  line-height: 26px;
  text-align: center;
  letter-spacing: 1px;
  text-decoration: none;
}

图片:

enter image description here

为什么选择了退化的颜色?

谢谢!!

最佳答案

您是否试图隐藏默认外观?我认为这就是问题所在。试试这个:

 select {
   -webkit-appearance : none;
 }

它隐藏默认样式,如边框、框阴影、边框半径等。 它可以应用于所有表单元素(输入、按钮、文本区域等)。

关于android - 带有 HTML 选择标签颜色的 iOS9 Cordova 元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32627542/

相关文章:

android - 当 ExpandableListView 扩展时,CheckBoxes 自动取消选中

android - 我想设置每天在不同时间触发的重复闹钟

android - 为什么 Asynctask 或 Runnable 的生命周期与 Activity 的生命周期不同?

html - 使用视口(viewport)高度在父级内部垂直居中 div

html - 带有 em 和 px 的 CSS 样式填充

html - 类 ="mytest anothertest"...另一个测试是什么?

android - Kotlin Intent 语法错误

html - 所见即所得编辑器 JavaScript : semantic and machine understanding

javascript - 两个 div 堆叠在一起——底部 div 上的链接不可点击

css - 使 div 稍微偏离中心