<div class="box">THIS IS A TEST TO USE MIN-CONTENT TO FORCE LINE BREAKS</div>
<div class="box">...HAS LIVED QUIETLY IN HARVARD SQUARE FOR NEARLY</div>
<div class="box">我一直在做一个网站,这个网站主要用来向用户展示大型图片</div>
body {
width: 100vw;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.box {
margin: 2vh;
word-spacing: 100vw;
max-width: min-content;
background: rgba(#f36, .85);
color: #fff;
padding: 2vh;
&:nth-child(1) {
max-width: min-content;
word-spacing: normal;
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.