CSS心得

我最差的一環。

參考資料

基本圖形


基本圖形

六角形
#box {
    width: 100px;
    height: 55px;
    background: blue;
    position: relative;
}
#box:before {
    content: "";
    position: absolute;
    top: -25px; 
    left: 0;
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 25px solid blue;
}
#box:after {
    content: "";
    position: absolute;
    bottom: -25px; 
    left: 0;
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-top: 25px solid blue;
}
對 :after :before 的CSS操作

參考資料

results matching ""

    No results matching ""