】。"/>
】。">

首頁  >  文章  >  web前端  >  前端css如何實作箭頭

前端css如何實作箭頭

coldplay.xixi
coldplay.xixi原創
2021-03-17 17:01:326150瀏覽

前端css實作箭頭的方法:設定箭頭盒子,在div裡設定屬性即可,程式碼為【

】。

前端css如何實作箭頭

本教學操作環境:windows7系統、css3版,DELL G3電腦。

前端css實作箭頭的方法:

效果圖:

前端css如何實作箭頭

htm部分:

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

css部分:

.arrow_box{
    width:100px;
    height:100px;
    border-radius: 10px;
    background: rgba(255,0,0,0.5);
    position: relative;
}     
 
.arrow{
    width:0;
    height:0;
    border-width: 10px;
    border-style:solid;
    border-color:transparent transparent transparent rgba(255,0,0,0.5);
    position: absolute;
    right:-20px;
    top:35px;
}

相關學習推薦:css教學

以上是前端css如何實作箭頭的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn