iphone中的CSS3自定义滚动问题

iphone中的CSS3自定义滚动问题,iphone,css,scrollbar,Iphone,Css,Scrollbar,我为webkit浏览器定制了滚动条。 下面是它的代码 #defaultScroll p { width: 600px } #defaultScroll { height: 400px; width: 300px; overflow-x: scroll; position: relative; } #defaultScroll::-webkit-scrollbar-button { background: blue; } #defaultScroll

我为webkit浏览器定制了滚动条。 下面是它的代码

#defaultScroll p {
    width: 600px
}
#defaultScroll {
    height: 400px;
    width: 300px;
    overflow-x: scroll;
    position: relative;
}
#defaultScroll::-webkit-scrollbar-button {
    background: blue;
}
#defaultScroll::-webkit-scrollbar {
    width: 12px;
}
#defaultScroll::-webkit-scrollbar-track {
    background-color: #ffff00;
    border: 1px solid red;
}
#defaultScroll::-webkit-scrollbar-thumb {
    background-color: red;
    border-radius: 5px;
}
#defaultScroll::-webkit-scrollbar-thumb:hover {
    background-color: green;
}
这是它的基本原理

它在所有浏览器中都可以正常工作,但是只有在iphone中,溢出-x不可见


刚刚为
添加了
高度:12px
\defaultScroll::-webkit滚动条

#defaultScroll::-webkit-scrollbar {
    width: 12px;
    height: 12px
   }
一切都很顺利

我知道我们需要定义水平滚动条的高度