Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/420.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
Javascript 父页面没有';当鼠标移到iframe上时,不能滚动_Javascript_Html_Reactjs_Iframe - Fatal编程技术网

Javascript 父页面没有';当鼠标移到iframe上时,不能滚动

Javascript 父页面没有';当鼠标移到iframe上时,不能滚动,javascript,html,reactjs,iframe,Javascript,Html,Reactjs,Iframe,我有一个react页面,其中包括一个iframe组件。当我的鼠标位于iframe组件(在iframe内容上)上时,父页面不会滚动。如何使父页面即使在鼠标位于iframe内容上也可滚动 <iframe style={{width: '100%', overflow: 'visible', display: this.state.loader ? 'none' : 'block'}} ref='iframe' id={this.props.iframe.id}

我有一个react页面,其中包括一个
iframe
组件。当我的鼠标位于
iframe
组件(在iframe内容上)上时,父页面不会滚动。如何使父页面即使在鼠标位于iframe内容上也可滚动

<iframe
    style={{width: '100%', overflow: 'visible', display: this.state.loader ? 'none' : 'block'}}
    ref='iframe'
    id={this.props.iframe.id}
    src={this.props.iframe.url}
    onLoad={() => this.iframeOnload()}
    width='100%'
    height='100%'
    scrolling='yes'
    frameBorder='0'
 /> 
this.iframeOnload()}
宽度='100%'
高度='100%'
滚动“是”
frameBorder='0'
/> 

您可以设置属性
scrolling=“yes”
这就是它可以滚动的原因

尝试设置
scrolling=“no”

this.iframeOnload()}
宽度='100%'
高度='100%'
滚动class='no'
frameBorder='0'
/> 
<iframe
        style={{width: '100%', overflow: 'visible', display: this.state.loader ? 'none' : 'block'}}
        ref='iframe'
        id={this.props.iframe.id}
        src={this.props.iframe.url}
        onLoad={() => this.iframeOnload()}
        width='100%'
        height='100%'
        scrolling='no'
        frameBorder='0'
 />