Use CSS borders to create a triangle shape - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Border

Description

Use CSS borders to create a triangle shape

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
 </head> <!--from   w ww  . j  a  v a  2  s .  c  o  m-->
 <body> 
  <div style="width:500px;height:20px;border-color: transparent transparent #222;
  border-style: solid;
  border-width: 6px; ">
    hi 
  </div>  
 </body>
</html>

Related Tutorials