首先,我不想只是删除它,而是要确保那里仍然有滚动功能。
这是因为我希望在网站上产生“幻灯片放映”的效果,您可以在该网站上单击“下一步”,然后单击,然后使用滚动条浏览该网站。
我使用以下命令在其他浏览器中隐藏了滚动条:
::-webkit-scrollbar {
display: none;
}
适用于webkit浏览器和overflow: -moz-scrollbars-none;
Firefox。但是,谈到IE,我找不到任何东西可以简单地将其隐藏。
我在互联网上找到了这些:
scrollbar-3dlight-color:;
scrollbar-arrow-color:;
scrollbar-base-color:;
scrollbar-darkshadow-color:;
scrollbar-face-color:;
scrollbar-highlight-color:;
scrollbar-shadow-color:;
我以为通过将颜色更改为transparent
,它会消失,但并没有(只是恢复为正常)。
有没有一种方法可以让我简单地display:none
在IE中隐藏滚动条(简单地像其他东西)?我愿意接受css
和js
选择。
注意:添加时,单击标签overflow:hidden;
会使页面停止经过第二个页面。div
a
试试这个技巧
body, div, html{
height:100%;
width:100%;
padding:0;
margin:0;
}
body{
overflow:hidden;
position:fixed;
}
div{
overflow-y:scroll;
position:relative;
right:-20px;
}
它使可滚动div偏移,因此其垂直滚动条在可见区域之外。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句