Reputation: 146
It is possible to create ribbon with border inside. I have created default ribbon like this:
But I need ribbon like this. I cannot use images.
What is the best possible solution?
Upvotes: 1
Views: 483
Reputation: 28437
This is the best I could do.
h1 span:before, h1 span:after {
content: "";
height: 90%;
margin-top: 2px;
width: 70px;
border: 3px solid black;
position: absolute;
top: 0;
}
h1 span:before {
right: 100%;
border-left: 0 none;
}
h1 span:after {
left: 100%;
border-right: 0 none;
}
h1:before, h1:after {
content: "";
height: 31px;
width: 31px;
margin-top: 8px;
position: absolute;
top: 0;
-ms-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
h1:before {
border-top: 3px solid black;
border-right: 3px solid black;
right: calc(100% + 70px - 16px);
}
h1:after {
border-bottom: 3px solid black;
border-left: 3px solid black;
left: calc(100% + 70px - 16px);
}
Notes:
transform
, calc
, :before
and :after
h1:before, h1:after
manually.Upvotes: 1