隐藏不在chrome上使用css的滚动条
我试图用css隐藏滚动条,但它在firefox上工作,但在Chrome上滚动条仍然存在隐藏不在chrome上使用css的滚动条,css,google-chrome,Css,Google Chrome,我试图用css隐藏滚动条,但它在firefox上工作,但在Chrome上滚动条仍然存在 .tests-container{ @media (min-width: 1025px) { max-height: 600px; overflow-y: scroll; :-webkit-scrollbar{ display: none; } -ms-overflow-style: none;
.tests-container{
@media (min-width: 1025px) {
max-height: 600px;
overflow-y: scroll;
:-webkit-scrollbar{
display: none;
}
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
}
我在类中没有看到媒体查询,因此我将改为
@media (min-width: 1025px) {
.tests-container {
max-height: 600px;
/* overflow-y: scroll; */
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
.tests-container::-webkit-scrollbar {
display: none;
}
}
我在这里举了个例子。它在我的笔记本电脑Chrome MacOS上运行良好