Using CSS Transforms:
You can create a full arrow with a lower border using the approach adopted in the snippet below. Here the arrow is created by the element :after
, and the line below is created using the parent container. The axis of rotation is fixed using the same transform-origin
for the parent and child.
, , - ( , ).
.arrow {
position: relative;
height: 25px;
width: 25px;
border-bottom: 2px solid #c7c7c7;
}
.arrow:after {
position: absolute;
content: "";
bottom: -1px;
left: -2px;
height: calc(100% / 1.414);
width: calc(100% / 1.414);
border-top: 2px solid #c7c7c7;
border-left: 2px solid #c7c7c7;
transform-origin: left bottom;
transform: rotate(45deg);
}
.arrow { transition: all 1s; }
.arrow:hover { height: 50px; width: 50px; }
<div class="arrow"></div>
SVG:
SVG , , . path
, , , d
. M
, L
, .
svg {
width: 25px;
height: 18px;
}
path {
stroke: #c7c7c7;
stroke-width: 2;
fill: transparent;
}
svg{ transition: all 1s; }
svg:hover{ width: 50px; height: 36px; }
<svg viewBox='0 0 50 50' preserveAspectRatio='none'>
<path id='arrowhead' d='M0,48 L25,2 50,48z' vector-effect='non-scaling-stroke'/>
</svg>
:
linear-gradient
, , . , ( ).
.arrow {
position: relative;
height: 18px;
width: 18px;
border-top: 2px solid #c7c7c7;
border-left: 2px solid #c7c7c7;
background: linear-gradient(to left top, transparent 50%, #c7c7c7 50%, #c7c7c7 60%, transparent 60%);
transform: rotate(45deg);
}
.arrow { transition: all 1s; }
.arrow:hover { height: 50px; width: 50px; }
<div class="arrow"></div>