Is there any way to create an arrow like that in the following button, using CSS?
I know how to create triangle-like arrows like this
#triangle_arrow {
top: 3pt;
content: "";
display: inline-block;
width: 0.5em;
height: 0.5em;
border-right: 0.1em solid black;
border-top: 0.1em solid black;
transform: rotate(45deg);
}
but that line towards the arrow's corner is confusing me!
Fortunately for you, the → HTML entity exists, meaning you don't need to faff around with CSS triangles and instead can simply use
content
within a pseudo-element:Already there is way through which you could achieve this i.e. suggested by James, but you could even do this using
pseudo selectors
or using pre-defined icons usingfont awesome
to get an arrow icon next to some tag, as below.Solution 1:
Solution 2 :
Resizeable CSS-only arrow. https://codepen.io/ArtZ91/pen/jjbOvG