html - 选择下拉框在某些机器上显示为白色,但不是我的

标签 html css

我有一个选择框,我已经添加了一些格式,这在我的机器上看起来很好(mac os,运行黑暗模式或浅色模式)在 safari 和 chrome 上它对我来说看起来是一样的,黑色字体在较亮的背景上。但是在我同事的机器上(Windows 上的 chrome)它看起来是白色的。我该如何解决这个问题以及如何专门针对 css 中下拉列表的外观?

  <select class="dark-input">
         <option>etc</option>
  </select>

  //shared class with input
 .dark-input {
  padding: 10px;
  color: white;
  width: 250px;
  box-sizing: border-box;
  border: none;
  border-radius: 2px;
  transition: background-color 0.5s ease;
  background: #ffffff1a;
}

//format Select box
select.dark-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 10px;
}

example of problem enter image description here

最佳答案

Option Select box showing different color in different Machine Like (Window, Ubuntu safari and) etc. Because of it's HTML default Select box, so that u need to create custom Select design box using JS..... just go here :https://www.w3schools.com/howto/tryit.asp?filename=tryhow_custom_select

关于html - 选择下拉框在某些机器上显示为白色,但不是我的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57373443/

相关文章:

html - CSS 按钮悬停和激活会移动其下方的段落

javascript - 滚动到具有特定类的 id

html - 用于宽屏和盒装布局的 Bootstrap CSS

html - 我如何设置 div 不透明度而不是文本?

css - 使用 CSS 缩小(但不放大)图像以适应 IE9 中的 div 容器(最大宽度 : 100% fix)

javascript - 使用 jQuery UI 的嵌套 Accordion 不显示下一个列表项

c# - 如何确定下拉列表是否折叠?

javascript - jQuery 动画在一段时间后中断

CSS定位相对不显示上边距

html - 当我选择 'View' 时模块窗口不会打开