如何在React中使用Webkit

我需要隐藏div组件的滚动条,同时仍保留滚动功能。我为此使用了webkit:

const styles = {
    noscroll:{
        '&::webkit-scrollbar':{
            width:'0rem',height:'0rem'
        }
    }
}

,然后在我的代码中将其称为

<ScrollSyncPane style={styles.noscroll} id="noscroll">
    <Grid
        style={styles.noscroll} 
        cellRenderer={this.headerRenderer}
        columnCount={colm[0].length}
        columnWidth = {150}
        height = {70}
        rowCount = {colm.length}
        rowHeight = {70}
        width = {1250}
    />
</ScrollSyncPane>

根据我在SO上阅读的建议,我将'&'替换为'*',甚至将JSS写为

scrollbar:{
    width:0,height=0
}

在样式内的noscroll对象中。但是这些似乎都不起作用。是因为它是ScrollSync组件吗?

zkx993299184 回答:如何在React中使用Webkit

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3003341.html

大家都在问