basically, I would like for each of these 4 boxes to be a div and then have a class preferably for each type of border to create a border with that kind of shadow or something
But I have no clue where to start except create a border
basically, I would like for each of these 4 boxes to be a div and then have a class preferably for each type of border to create a border with that kind of shadow or something
But I have no clue where to start except create a border
I'm not sure if there's a way to do this with the literal border attribute in CSS, but with a little fanagling, you could wrap that div in another div which uses the repeating gradient property as such:
.wrap {
background: repeating-linear-gradient( 45deg, black, black 5px, white 5px, white 10px);
border: 1px solid black;
display: flex;
justify-content: center;
align-items: center;
}
.real {
background-color: white;
border:1px solid black;
width: 100%;
height: 100%;
margin: 15px;
}
<div class="wrap">
<div class="real">
<p>Sup</p>
</div>
</div>
Where you can change the margin around the inner div to replicate increase border size and you can mess around with the values in the repeating-linear-gradient property to increase amount of lines shown and their color.
You can play with the gradient percentages to get what you want
.border-box {
position: relative;
width: 25rem;
height: 20rem;
box-sizing: border-box;
border: 2rem solid transparent;
border-image: repeating-linear-gradient(to right top, black 10%, white 11%) 15%;
}
<div class="border-box"></div>