LESS 純CSS帶小三角提示框方案

效果預覽

實現方法 (less)

.layer-item-tip {
    position: absolute;
    left: 22px;
    top: 89px;
    padding: 6px;
    width: 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;
        width: 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;
        width: 0;
        height: 0;
        line-height: 0;
        border-bottom: 8px solid #FFF6E9;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
    }
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章