I'm not familiar working with this type of CSS effect.
I need an approach that allows me to create a line with a "v" effect in a HTML element using HTML and CSS. The image below shows what I need to accomplish.
I'm not familiar working with this type of CSS effect.
I need an approach that allows me to create a line with a "v" effect in a HTML element using HTML and CSS. The image below shows what I need to accomplish.
Tried two solutions, you can see if any help you. First one used this approach.
div {
height: 1px;
width: 200px;
background: transparent;
position: relative;
cursor:pointer;
border-bottom:1px solid black;
border-right:1px solid black;
border-left: 0px solid black;
border-radius:10px;
}
div:before {
content: "";
position: absolute;
top: -webkit-calc(100% - 10px); /*may require prefix for old browser support*/
top: calc(100% - 10px); /*i.e. half the height*/
left: 90px;
height: 20px;
width: 20px;
background: white;
transform: rotate(45deg);
border-bottom:inherit;
border-right:inherit;
box-shadow:inherit;
}
<div></div>
This link might give you more ideas.
#triangle {
position: relative;
text-align: center;
padding: 10px;
margin-bottom: 6px;
height: 200px;
width: 200px;
}
#triangle:before {
content: '';
position: absolute;
top: 0;
left: 0;
height: 1%;
width: 50.5%;
background: black;
transform: skew(0deg, 30deg);
}
#triangle:after {
content: '';
position: absolute;
top: 0;
right: 0;
height: 1%;
width: 49.5%;
background: black;
transform: skew(0deg, -30.5deg);
}
<div id="triangle"></div>