我在 suedo 元素之前和之后由 CSS 生成的框的顶部中间有一个箭头。但是,当我添加overflow-y:scroll;
到框中时,由 css 生成的箭头消失了。
小提琴:http : //jsfiddle.net/aaronmallen/FP5jr/
CSS:
#notesdisplay {
position: relative;
background: #E8E8E8 ;
border: 3px solid #000000;
display: box;
max-width: 500px;
max-height: 200px;
padding: 25px;
}
#notesdisplay:after, #notesdisplay:before {
bottom: 100%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
#notesdisplay:after {
border-color: rgba(255, 255, 255, 0);
border-bottom-color: #E8E8E8;
border-width: 10px;
left: 50%;
margin-left: -10px;
}
#notesdisplay:before {
border-color: rgba(21, 83, 132, 0);
border-bottom-color: #000000;
border-width: 14px;
left: 50%;
margin-left: -14px;
}
#notesdisplay2 {
position: relative;
background: #E8E8E8 ;
border: 3px solid #000000;
display: box;
max-width: 500px;
max-height: 200px;
padding: 25px;
overflow-y:scroll;
}
#notesdisplay2:after, #notesdisplay2:before {
bottom: 100%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
#notesdisplay2:after {
border-color: rgba(255, 255, 255, 0);
border-bottom-color: #E8E8E8;
border-width: 10px;
left: 50%;
margin-left: -10px;
}
#notesdisplay2:before {
border-color: rgba(21, 83, 132, 0);
border-bottom-color: #000000;
border-width: 14px;
left: 50%;
margin-left: -14px;
}