Saturday, 5 October 2013

CSS Trick: Triangle

This CSS triangle is created by borders. 
The first triangle has border-color property: border-color:red black blue yellow;

Then, I changed the color; red to #3c939, others colors to transparent;
For further info
http://css-tricks.com/animation-css-triangles-work/?utm_source=dlvr.it&utm_medium=twitter
 


----------------------------------------------------------------------------------
<HTML>
<div class=”triangle1”></div>
<div class=”triangle2”></div>
----------------------------------------------------------------------------------
<CSS>
.triangle1{
         border-color:red black blue yellow;
         border-style:solid;         border-width:10px;         height:0;         width:0;
}
.triangle2{
         border-color:#3c939a transparent transparent transparent;         border-style:solid;         border-width:10px;         height:0;         width:0;
}
 ----------------------------------------------------------------------------------

No comments:

Post a Comment