【发布时间】:2019-01-18 13:46:02
【问题描述】:
我正在使用 jsf,我正在使用 h:selectOneMenu 标签。目前在网站上显示如下:
selectOneMenu
但我想改变最后箭头的外观。它应该是红色且没有背景。我尝试了很多方法,例如使用溢出属性或将选择项的背景更改为我想要的下拉箭头。更改元素的颜色也会影响其中的书写。出于某种原因,将 selectOneMenu 放入 div 并为其添加以下样式可以正常工作:
.epSelect {
width: 240px;
overflow: hidden;
background: url(..arrowdown_red.png) no-repeat right #FAFAFA;
border: 1px solid #CDCDCD;
color: #333333;
height: 27px; }
.epSelect select {
background: transparent;
width: 257px;
height: 27px;
padding-top: 5px;
font-size: 12px;
border: 0;
border-radius: 0;
-webkit-appearance: none;
padding-left: 3%;
cursor: pointer;
}
“epSelect”因为beeing作为类添加到div
有没有人知道特定的 css 元素可以用来改变箭头的颜色?
在标准 html select 标记中,它可以通过 label:after 属性来处理,如下所示:http://cssdeck.com/labs/styling-select-box-with-css3
非常感谢任何帮助。
【问题讨论】:
标签: javascript html css jsf