4
I am studying about diagonal edges and intend to apply an effect like this on my page:
Until now I found little material about it and the closest was this:
html, body {
height: 100%;
}
* {
box-sizing: border-box;
}
body {
background: tomato;
}
.box {
position: relative;
max-width: 700px;
min-height: 400px;
margin: auto;
top: 50%;
-webkit-transform: translateY(-50%) translateZ(0);
transform: translateY(-50%) translateZ(0);
overflow: hidden;
padding: 20px 20px 0 0;
}
.box:before {
content: '';
display: block;
position: absolute;
z-index: -1;
width: 774px;
height: 500%;
background-image: linear-gradient(90deg, transparent 50%, white 50%);
background-size: 8px 10000px;
-webkit-transform: rotate(45deg) translateY(-50px) translateX(-598px);
transform: rotate(45deg) translateY(-50px) translateX(-598px);
}
.content {
position: relative;
background: white;
display: block;
min-height: 380px;
padding: 2em;
}
.centered {
position: relative;
text-align: center;
font-family: sans-serif;
font-size: 1rem;
color: tomato;
line-height: 1.5;
max-width: 400px;
margin: 0 auto;
}
<div class="box">
<div class="content">
<div class="centered">
pseudo isometric diagonal stripe border woop!
</div>
</div>
</div>
But I can’t apply or understand this logic.
This has more expensive than a div (or pseudoelement) with lists and other white div inside. It has infinite ways to do what you want, it would be important to [Dit] the post and better specify the context. Probably a [mcve] of what tried would be a good starting point.
– Bacco
I was going to post it as a reply, but as you already have enough: https://codepen.io/anon/pen/Begjya
– Bacco