当前位置:  开发笔记 > 编程语言 > 正文

如何隐藏div中的滚动条

如何解决《如何隐藏div中的滚动条》经验,为你挑选了1个好方法。

我已经创建了一个包含溢出内容可滚动的div,但是我希望它的滚动被隐藏但是div仍然可以滚动.

.description
{
    height: 150px;
    overflow: scroll;
}

Description

After a series of deadly discoveries, Bruce Wayne has learned that the Court of Owls is real ? and a deadly threat out to control Gotham City! Unleashing their deadly assassins known as the Talons, Batman must stop the insidious Court of Owls before they claim the city for their own. In doing so, The Dark Knight will uncover dark secrets ? not just about the city he?s sworn to protect, but about the history of the Wayne family.After a series of deadly discoveries, Bruce Wayne has learned that the Court of Owls is real ? and a deadly threat out to control Gotham City! Unleashing their deadly assassins known as the Talons, Batman must stop the insidious Court of Owls before they claim the city for their own. In doing so, The Dark Knight will uncover dark secrets ? not just about the city he?s sworn to protect, but about the history of the Wayne family.After a series of deadly discoveries, Bruce Wayne has learned that the Court of Owls is real ? and a deadly threat out to control Gotham City! Unleashing their deadly assassins known as the Talons, Batman must stop the insidious Court of Owls before they claim the city for their own. In doing so, The Dark Knight will uncover dark secrets ? not just about the city he?s sworn to protect, but about the history of the Wayne family.

Nikhil Mahes.. 12

您可以通过对其应用display:none来隐藏滚动条.尝试下面的CSS.

CSS:

::-webkit-scrollbar { 
    display: none; 
}

JSFiddle:https://jsfiddle.net/nikdtu/arn77mt1/



1> Nikhil Mahes..:

您可以通过对其应用display:none来隐藏滚动条.尝试下面的CSS.

CSS:

::-webkit-scrollbar { 
    display: none; 
}

JSFiddle:https://jsfiddle.net/nikdtu/arn77mt1/

推荐阅读
殉情放开那只小兔子
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有