CSS prevent div flex from stretching child

前端 未结 2 667
伪装坚强ぢ
伪装坚强ぢ 2020-12-11 09:58

The moment div has the flex display property it stretches the paragraph. I seem to be missing something but no property I can think to put on the flex div chang

2条回答
  •  既然无缘
    2020-12-11 10:15

    span { 
      -webkit-box-decoration-break: clone;
      -o-box-decoration-break: clone;
      box-decoration-break: clone;
      background-color: green;
    }
    div {
      text-align:center;
      height: 200px;
      width: 100px;
    }
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod

提交回复
热议问题