flex布局中 overflow 问题

.tree {
  display: flex;
  height: calc(100vh - 42px);
  background: #fff;
  padding: 10px;
  border-radius: 4px;
}

.tree>.left { 
  width: 400px; 
  height: 95vh;
  overflow: auto;
} 

.tree>.right {
  flex: 1;
  max-width: 2000px; 
  border-left: 1px #eee solid;  
  overflow: auto; 
}

如果只在left中有 overflow: auto;  当 right宽度大的时候, left就被覆盖导致显示不出

你可能感兴趣的:(前端,javascript,html)