Skip to content

Instantly share code, notes, and snippets.

@bndynet
Last active May 8, 2019 01:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bndynet/88b655dd05da997c67bc00870013bbb6 to your computer and use it in GitHub Desktop.
Save bndynet/88b655dd05da997c67bc00870013bbb6 to your computer and use it in GitHub Desktop.
CSS Arrow

Code for arrows in CSS

.arrow-left {
  display: inline-block;

  
  position: relative;
  width: 0; 
  height: 0; 
  border-top: 0.35em solid transparent;
  border-bottom: 0.35em solid transparent; 
  /* arrow border color */
  border-right: 0.35em solid blue; 
}

.arrow-left:after {
  content: "";
  position: absolute;
  top: -0.35em;
  left: 1px;
  width: 0; 
  height: 0; 
  border-top: 0.35em solid transparent;
  border-bottom: 0.35em solid transparent; 
  /* arrow color */
  border-right: 0.35em solid #fff; 
}

Demo at https://codepen.io/bndynet/pen/qvWxNy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment