div添加滚动条

时间:2021-04-20 17:08:23

html页面


<div id="calm" class="pop-box-cal" style="border: solid 1px #6e8bde;">

</div>

css

@charset='utf-8';
#greybackground {
background: #5E5E5E;
display: block;
z-index: 100;
width: 100%;
position: absolute;
top: 0;
left: 0;
}

.pop-box {
z-index: 9999; /*这个数值要足够大,才能够显示在最上层*/
margin-bottom: 3px;
display: none;
position: absolute;
background: #FFF;
border: solid 1px #6e8bde;
}

.divShouTesth4 {
color: #FFF;
cursor: default;
height: 18px;
font-size: 14px;
font-weight: bold;
text-align: left;
padding-left: 8px;
padding-top: 4px;
padding-bottom: 2px;
background: #526DBE;
margin-top: 0px;
}

.pop-box-body {
height: 170px;
clear: both;
margin: 4px;
padding: 2px;
overflow-x: auto;
overflow-y: auto;
/* 滚动条相关的颜色属性 */
scrollBar-face-color: #e4e4e4; /* 滑块 */
scrollBar-3dLight-color: #e4e4e4; /* 3维光线 */
scrollBar-darkshadow-color: #e4e4e4; /* 暗影 */
scrollBar-shadow-color: #e4e4e4; /* 阴影 */ scrollBar-arrow-color :
bule; /* 箭头 */
scrollBar-base-color: #fff;
scrollBar-arrow-color: bule; /* 主要颜色 */
}
.pop-box-cal {
height: 300px;
clear: both;
margin: 4px;
padding: 2px;
overflow-x:display;
overflow-y: auto;
/* 滚动条相关的颜色属性 */
scrollBar-face-color: #e4e4e4; /* 滑块 */
scrollBar-3dLight-color: #e4e4e4; /* 3维光线 */
scrollBar-darkshadow-color: #e4e4e4; /* 暗影 */
scrollBar-shadow-color: #e4e4e4; /* 阴影 */ scrollBar-arrow-color :
bule; /* 箭头 */
scrollBar-base-color: #fff;
scrollBar-arrow-color: bule; /* 主要颜色 */
}