我使用选择的插件,我添加了多个箭头。我将高度设置为选择,如果选择了多个项目,它将自动显示滚动条。
现在,当显示滚动条时,如果我滚动滚动条,则箭头消失。
在显示滚动条时我想要。如果滚动条向下滚动,则箭头将一直显示在输入的右侧。
我尝试了很多方法,但是它不起作用,因为图像使用了position: absolute
属性
这是我的代码:
.chosen-container-multi.chosen-container ul.chosen-choices::after{
background: url(https://image.ibb.co/cdSC2e/Select_Arrow.png) center center no-repeat !important;
width: 33px;
height: 50px;
content: " ";
position: absolute;
/*position: fixed; */
right: 9px;
}
http://jsfiddle.net/hv0d46b8/19/
对此有什么想法吗?
答案 0 :(得分:2)
您已在伪元素中添加了与UL对应的箭头,但应分别与UL的父div一起调用
.chosen-container-multi.chosen-container::after{
background: url(https://image.ibb.co/cdSC2e/Select_Arrow.png) center center no-repeat !important;
width: 33px;
height: 100%;
content: " ";
position: absolute;
/*position: fixed; */
right: 14px;
top: 0px;
}