<div class="backgroundWrapper">
<div class="background">
<div class="title">Slice example:</div>
<span class="borderProperty slice">
Right Thoughts
Right Words
Right Action
</span>
</div>
<div class="background">
<div class="title">Clone example:</div>
<span class="borderProperty clone">
Right Thoughts
Right Words
Right Action
</span>
</div>
</div>
body {
margin: 0;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
font-size: 14px;
background-color: #222;
.backgroundWrapper {
display: flex;
align-items: center;
justify-content: space-around;
flex-wrap: wrap;
.background {
max-width: 200px;
margin: 20px;
.title {
padding: 10px 5px;
font-style: italic;
color: #fff;
}
.borderProperty {
color: white;
padding: 10px 15px;
border-radius: 5px;
box-shadow: 2px 1px 5px rgba(#222, .2);
font-size: 24px;
line-height: 2.75;
border: 3px solid rgb(28,86,116);
}
.slice {
-webkit-box-decoration-break: slice;
box-decoration-break: slice;
}
.clone {
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
}
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.