css - 如何更改 xPage 组合框下拉箭头的背景颜色?

标签 css xpages

组合框箭头在 Chrome 和 IE 中看起来不错,但在 FF 中看起来不太好。 这是我的简单 xPage:

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">

<xp:comboBox id="inputComboBoxSearch" defaultValue="0" value="0"
    style="height:60px; width:120px; text-align:right; box-shadow:none; border-radius:0; display:inline;">
        <xp:selectItem itemLabel="Search by" itemValue="0"></xp:selectItem>
        <xp:selectItem itemLabel="User" itemValue="1"></xp:selectItem>
        <xp:selectItem itemLabel="Date" itemValue="2"></xp:selectItem>
        <xp:selectItem itemLabel="City" itemValue="3"></xp:selectItem>
    </xp:comboBox>
</xp:view>  

And here is how it look like in different browsers. How to change FF style so it is same as on Chrome?

enter image description here

最佳答案

styleClass="" 添加到您的 xp:comboBox。然后,Firefox 上箭头的灰色背景消失了。

如果你想让你的组合框在所有浏览器上看起来都一样,那么使用 Dojo 并添加 dojoType="dijit/form/Select" 代替。

<xp:comboBox
    id="inputComboBoxSearch"
    defaultValue="0"
    value="0"
    style="height:60px; width:120px;"
    dojoType="dijit/form/Select">

关于css - 如何更改 xPage 组合框下拉箭头的背景颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42189689/

相关文章:

html - 所有文本都应该放在段落标签中吗?

javascript - 样式选择框选项 :disabled when it's checked

javascript - 给父li和子li添加css类

xpages - 如何在 Bluemix 中调试 XPage 应用程序?

xPages 中的 JavaScript 错误

java - XPages - 使用 Apache POI 创建 Word 文档

xpages - 如何覆盖或添加 XPage NotesXspDocument 事件?

html - 不能将单选按钮垂直放置在中间

javascript - 在执行 ng-repeat 并执行不会反射(reflect)在 html 中的操作时,将范围从 html 绑定(bind)到指令

performance - 对于新的 XPage 开发人员,您最喜欢的 3 个 XPage 性能提示是什么?