place something in a triangle-shaped box - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Shape

Description

place something in a triangle-shaped box

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">
.arrow-right {
   position:relative;
   width:0;
   height:0;
   border-left:151px solid Chartreuse;
   border-bottom:151px solid yellow;
   border-right:151px solid blue;
}

.arrow-right p {
   position:absolute;
   top:71px;
   left:-21px;
}
</style> <!--from  www.  j a  va 2s .c o m-->
 </head> 
 <body> 
  <div class="arrow-right"> 
   <p>Lorem </p> 
  </div>  
 </body>
</html>

Related Tutorials