css画三角形,对角 √ 勾形

.selected{
        border-color: #5FB878;
    }

    .selected:after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        border-top: 30px solid #5FB878;
        border-left: 30px solid transparent;
    }

    .selected:before {
        content: '';
        position: absolute;
        width: 14px;
        height: 8px;
        background: transparent;
        top: 4px;
        right: 1px;
        border: 2px solid white;
        border-top: none;
        border-right: none;
        -webkit-transform: rotate(-55deg);
        -ms-transform: rotate(-55deg);
        transform: rotate(-55deg);
        z-index: 9;
    }

  最终效果

 

posted @ 2020-08-06 17:46  怪-人  阅读(543)  评论(0编辑  收藏  举报