The art of CSS – Pure CSS Arrows

In the last year or so I have concentrated on the front end side of my skills and really developed my skills in the use of CSS and jQuery. CSS in particular has dazzled me in just how much you can do with it.

Chris Coyier from CSS Tricks is one amazing man that has shown me the light in a lot of different ways to do things that I never thought possible with CSS. He has created a page on his blog displaying raw shapes that have been created with pure CSS.

Being able to create such shapes and icons with CSS benefits a number of things like page load and performance. Yes, IE is not the best browser to be checking some of these things out on due to the lack of support in earlier versions, but as time goes on, naturally the need to worry about these earlier versions will be no more.Watch movie online Rings (2017)Watch movie online John Wick: Chapter 2 (2017)Watch movie online Logan (2017)Watch movie online Get Out (2017)Movie Fifty Shades Darker (2017)Watch movie online The Lego Batman Movie (2017)

Further more to these great CSS shapes, the use of the pseudo-elements in CSS are a very powerful tool, in particular the “:before” and “:after” pseudos. The arrows in the blog menu on this page are from using the :before pseudo together with the code to make a triangle. This can be attached to any element you require it on, list styles I would say to be the most common. For example:

<ul class="arrow_list">
<li>List item 1</li>
<li>List item 2</li>

Together with the CSS:
.arrow_list {
margin-left: 0;
.arrow_list li {
position: relative;
list-style: none;
padding-left: 15px;
.arrow_list li:before {
position: absolute;
left: 0;
top: 50%;
width: 0;
height: 0;
content: '';
display: block;
border: 5px solid transparent;
border-left: 5px solid #000;
margin-top: -5px;

Will produce:

  • List item 1
  • List item 2

Leave a Reply

Your email address will not be published. Required fields are marked *