設置兩個偽類,前一個偽類覆蓋至另一個了偽類,留出一些線出來就好:
html:
<div class="arrow">文字文字</div>
CSS:
div {
position: relative;
}
.arrow:after,.arrow:before {
width: 0;
height: 0;
border: 10px solid transparent;
border-left-color: orange;
position: absolute;
content: "";
}
.arrow:before{
top: 0;
left: 70px;//根據(jù)實際情況調(diào)整
border-left-color: white;
}
may you like it.
感謝大家的閱讀,希望大家收益多多。
本文轉(zhuǎn)自:https://blog.csdn.net/qq_34250472/article/details/55513862
推薦教程:《CSS教程》
更多關(guān)于云服務器,域名注冊,虛擬主機的問題,請訪問西部數(shù)碼官網(wǎng):m.ps-sw.cn