好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

CSS完成三角形

通过设置div的border属性,来实现!

将div的 height 和 width属性 分别设置为 0px ,将4边的border值 设置为 一样的宽度 ,通过调节边框的颜色课看到效果。

   style  >  
    div  {  height  :   0px  ;  width  :   0px  ;  
        border-top  :    20px  solid red  ;  
        border-left  :   20px solid blue  ;  
        border-right  :   20px solid gray  ;  
        border-bottom  :   20px solid pink  ; 
     } 
       style  > 
   head  > 
   body  > 
       div  >  div  > 
   body  >  

查看更多关于CSS完成三角形的详细内容...

  阅读:40次