用css寫三角

複製代碼代碼以下:spa


#triangle-up:after {im

content: '';
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 100px solid red;
}top

複製代碼代碼以下:img


#triangle-down:after {co

content: '';
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-top: 100px solid red;
}

 

複製代碼代碼以下:


#triangle-left:after {

content: '';
    width: 0;
    height: 0;
    border-top: 50px solid transparent;
    border-right: 100px solid red;
    border-bottom: 50px solid transparent;
}

 

複製代碼代碼以下:


#triangle-right:after {

content: '';
    width: 0;
    height: 0;
    border-top: 50px solid transparent;
    border-left: 100px solid red;
    border-bottom: 50px solid transparent;
}

 

複製代碼代碼以下:


#triangle-topleft:after{

content: '';
    width: 0;
    height: 0;
    border-top: 100px solid red;
    border-right: 100px solid transparent;
}

 

複製代碼代碼以下:


#triangle-topright:after {

content: '';
    width: 0;
    height: 0;
    border-top: 100px solid red;
    border-left: 100px solid transparent; 
}

 

複製代碼代碼以下:


#triangle-bottomleft:after {

content: '';
    width: 0;
    height: 0;
    border-bottom: 100px solid red;
    border-right: 100px solid transparent;
}

 

複製代碼代碼以下:


#triangle-bottomright:after {

content: '';     width: 0;     height: 0;     border-bottom: 100px solid red;     border-left: 100px solid transparent; }

相關文章
相關標籤/搜索