Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何使用;“显示”;滚动条的属性_Html_Css - Fatal编程技术网

Html 如何使用;“显示”;滚动条的属性

Html 如何使用;“显示”;滚动条的属性,html,css,Html,Css,我创建了一个没有滚动条的网站,通过使用代码 ::-webkit滚动条{display:none;} 我需要显示特定div的滚动条。但是,滚动条不可见 是我的代码示例。我想要的是,滚动条在内部框中可见,而不是在其他地方 提前谢谢你们,伙计们 你可以用 *:not(.box)::-webkit-scrollbar{ display: none; } JSFIDLE:. 真 的!非常感谢,@DOC ASAREL@DOC ASAREL已经找到了我一直在寻找的解决方案。谢谢你的努力,希曼殊。

我创建了一个没有滚动条的网站,通过使用代码

::-webkit滚动条{display:none;}

我需要显示特定div的滚动条。但是,滚动条不可见

是我的代码示例。我想要的是,滚动条在内部框中可见,而不是在其他地方

提前谢谢你们,伙计们

你可以用

*:not(.box)::-webkit-scrollbar{
     display: none;
}
JSFIDLE:.


真 的!非常感谢,@DOC ASAREL@DOC ASAREL已经找到了我一直在寻找的解决方案。谢谢你的努力,希曼殊。
*{margin:0 auto;padding:0px; }
html, body{ height:100%; width:100%;}

.big-box{
     height: 100%;
    background: orange;
}

.box{
    width: 200px;
    max-height: 200px;
    overflow-y: scroll;
    background: #ccc;
}