为什么Flex项仅限于父级大小?
body { margin: 0;}* { box-sizing: border-box;}.parent { min-height: 100vh; width: 50vw; margin: 0 auto; border: 1px solid red; display: flex; align-items: center; justify-content: center;}.child { border: 1px solid blue; width: 150%;}
<div class="parent"> <div class="child"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Amet tellus cras adipiscing enim eu turpis. Neque aliquam vestibulum morbi blandit. Sem integer vitae justo eget magna. </div></div>
width:150%
注:
牛魔王的故事
一只名叫tom的猫
慕的地8271018