简体   繁体   English

滚动条在 Iphone 和 safari 浏览器中不可见

[英]scroll bar not visible in Iphone and safari browser

I made a div that has a scroll function.我制作了一个具有滚动功能的 div。 The scroll bars appear on my desktop browsers (chrome, firefox) but when it comes to mobile, the scrollbar isn't visible.滚动条出现在我的桌面浏览器(chrome、firefox)上,但在移动设备上,滚动条不可见。

How can I make this visible all the time?我怎样才能让它一直可见?

.scroll_text {
    max-height: 250px;
    overflow-y: scroll;
    padding: 0px 0px;
    width: 100%;
    max-width: 220px;
    height: 100%;
}
.scroll_text::-webkit-scrollbar {  
    width: 8px;
    -webkit-width:8px;  
    -webkit-appearance: none;  
}  
.scroll_text::-webkit-scrollbar:vertical {
    width: 8px;
    -webkit-appearance: none;
}
.scroll_text::-webkit-scrollbar-track {  
    background-color: #DDE2E5;
}  
.scroll_text::-webkit-scrollbar-thumb {  
   background-color: #c99d5e;
   border: 1px solid rgba(92, 92, 92, 0.5);
   border-radius: 10px;
}  
.scroll_text::-webkit-scrollbar-thumb:hover {  
    background-color: #000;  
    
}  
.scroll_text:hover::-webkit-scrollbar-thumb {  
    background-color: #c99d5e;
    border: 1px solid rgba(92, 92, 92, 0.5);
    border-radius: 10px;
    -webkit-border-radius:10px;
}

This is an OS-specific setting.这是特定于操作系统的设置。 I'm not sure where it is on iPhone but on MacOS:我不确定它在 iPhone 上的位置,但在 MacOS 上: 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM