<div class="example">
<p>指定なし</p>
<div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill</p>
</div>
<p>text-align: justify;</p>
<div class="justify">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill</p>
</div>
</div>
* {
box-sizing: border-box;
}
body {
min-height: 100vh;
margin: 0;
padding: 20px;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
}
p {
margin: 0;
}
.example > p {
margin: 0 0 10px;
}
.example div:not(:last-child) {
margin-bottom: 10vh;
}
.example div {
background: #f5f5f5;
padding: 20px;
}
.justify {
text-align: justify;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.