arozwalak
8/28/2014 - 12:19 PM

CSS: triangles

CSS: triangles

.box {
    background-color: red;
    width: 200px;
    height: 100px;
    margin-top: 30px;
    position: relative;
}
.box:before {
    content: '';
    position: absolute;
    display: block;
    left: 0;
    top: -20px;
    width: 0;
    height: 0;
    border-width: 10px;
    border-color: red green blue yellow;
    border-style: solid;
}