css實現小箭頭樣式


<div class="arrow"></div>

  

.arrow{
    position: absolute;
    display: block;
    left: -13px;
    top: 12px;
    margin-right: 3px;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 12px;
    border-left-width: 0;
    border-right-color: #e5e5e5;
    -webkit-filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
}
.arrow:after{
    content: " ";
    border-width: 12px;
    position: absolute;
    display: block;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    top: -12px;
    margin-left: 1px;
    border-left-width: 0;
    border-right-color: #fff;
}

  arrow元素的父元素的overflow屬性必須為visible


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM