Modal覆盖除Firefox之外的所有浏览器的整个屏幕

时间:2019-01-31 02:22:56

标签: css firefox modal-dialog

我在模态中使用react-modal-image。它应该具有覆盖整个背景的背景,并且在所有浏览器中都可以正常工作,但Firefox的大小仅与其父div一样大。

<div className="container">
   <div className="content">
      <img src={src}/>
   </div>
</div>

CSS:

.container{ 
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
touch-action: none;
overflow: hidden;

}

.content{
    position: relative;
    height: 100%;
    width: 100%;
}

0 个答案:

没有答案
相关问题