Create an arrow using only CSS - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Arrow

Description

Create an arrow using only CSS

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

body {<!--from w ww .  ja  v  a 2 s  . com-->
   padding: 20px;
}
.arrow {
   height: 0;
   width: 0;
   border: 4px solid blue;
}
.arrow.up {
   border-bottom-color: red;
}
.arrow.down {
   border-top-color: red;
}


      </style> 
 </head> 
 <body> 
  <div class="arrow up"></div> 
  <br> 
  <div class="arrow down"></div>  
 </body>
</html>

Related Tutorials