2016-03-28 209 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