Create triangle shape - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Shape

Description

Create triangle shape

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">

.d-arrow {<!--   w  w  w . jav a  2  s  .  co  m-->
   position: absolute;
   left: 46%;
   width: 0px;
   height: 0px;
   border-style: solid;
   border-width: 40px 30px 0px 30px;
   border-color: #CCCCCC transparent transparent transparent;
}
.d-arrow-text {
   position: relative;
   margin: -35px 0px 0px -7px;
   padding: 0px 0px 0px 0px;
   font-weight: bold;
   font-size: 20px;
   line-height: 20px;
   color: #000000;
   text-shadow: none;
}


      </style> 
 </head> 
 <body> 
  <div class="d-arrow"> 
   <div class="d-arrow-text">
     3 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials