flex-grow

by HqRunMan

HTML

<div class="container">
  <div>程序员(英文Programmer)是从事程序开发、维护的专业人员。一般将程序员分为程序设计人员和程序编码人员,但两者的..</div>
  <div>对的</div>
</div>

SCSS

.container {
  display: flex;
  justify-content: flex-start;
  width: 600px;
  background-color: green;
  
  >div:nth-of-type(1) {
    flex-basis: 300px;
    flex-shrink: 1;
    background-color: gray;
  }
  
  >div:nth-of-type(2) {
    flex-basis: 100px;
    flex-shrink: 2;
    background-color: orange;
  }
}