LESS 纯CSS带小三角提示框方案

效果预览

实现方法 (less)

.layer-item-tip {
    position: absolute;
    left: 22px;
    top: 89px;
    padding: 6px;
     232px;
    color: #F28645;
    text-align: left;
    line-height: 16px;
    border-radius: 8px;
    border: solid 1px #F28645;
    background-color: #FFF6E9;
    box-sizing: border-box;
    z-index: 1;
    &::before {
        position: absolute;
        content: "";
        top: -8px;
        left: 26px;
         0px;
        height: 0px;  
        line-height: 0px;
        border-bottom: 8px solid #F28645;
        border-left: 8px solid #fff;
        border-right: 8px solid #fff;
    }
    &::after {
        position: absolute;
        content: "";
        top: -7px;
        left: 26px;
         0;
        height: 0;
        line-height: 0;
        border-bottom: 8px solid #FFF6E9;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
    }
}
原文地址:https://www.cnblogs.com/KevinTseng/p/15219128.html