2016-03-28 443 views
0

This is displayed in IE 11, UI does not display scroll barCSS属性 “溢出:滚动” 在IE 11

This is displayed in chrome, UI display scroll bar

不能显示滚动条的CSS代码是如下:

.r-listbox { 
      overflow:scroll; 
      width: 200px; 
      display: table-cell; 
      min-height: 1px; 
      padding-left: 10px; 
      margin-left: 200px; 
      margin-top: -10px;    
     } 

.r-listbox 
{ 
    -ms-overflow-style:scrollbar; 
    overflow:scroll; 
    width: 200px; 
    display: table-cell; 
    min-height: 1px; 
    padding-left: 10px; 
    margin-left: 200px; 
    margin-top: -10px; ``   
} 

我已被添加,b在IE 11中仍然无法显示滚动条。 enter image description here

+1

也许你正在使用的触摸IE11版本,所以滚动条被隐藏,但它们被激活。 –

+0

可以分享你的html代码吗? –

回答

1

你必须写IE跨浏览器的CSS就应该是这样的: -

.r-listbox { 
    -ms-overflow-style:scrollbar; 
    overflow:scroll; 
    width: 200px; 
    display: table-cell; 
    min-height: 1px; 
    padding-left: 10px; 
    margin-left: 200px; 
    margin-top: -10px;    
} 

你应该到这里来看看

https://msdn.microsoft.com/en-us/library/hh771902(v=vs.85).aspx

+0

因为这可能会奏效,所以'Cross-browser css'是错误的,因为它是一个专有定义,而不是交叉浏览器解决方案。这里的问题似乎是,我在评论的主要帖子中谈到,IE11正在运行在触摸模式。 –

+0

我添加了“-ms-overflow-style:scrollbar;”但它仍然不显示滚动条。 – user5365554