我有一个位置固定的 div(我的对话框),当执行某个操作时,我会给出更高的 z-index 来接管我的页面。overflow:hidden;
当 div 接管页面时,我试图通过在不影响页面宽度的情况下隐藏我的滚动条。任何建议如何执行?
html, body {
background: #FFFFFF;
font-family: "Avenir Medium";
height: 100%;
transition: overflow 0.37s easein-out
}
.div-dialog{
display: none;
opacity: 0;
position: fixed;
width: 0;
left: 0;
top: 0;
z-index: 0;
overflow: hidden;
background: white;
-webkit-transition: opacity 0.30s ease-in-out;
transition: opacity 0.30s easein-out;
}
Jfiddle试图复制我的结果。当您单击左上角的搜索图标时,我试图实现的实现是myspace的实现