實(shí)現(xiàn)的效果圖如下:
示例代碼如下:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>border制作書簽(圖形)</title> <style> .div2:before { /*做一個(gè)書簽效果*/ position: absolute; /*必須*/ top: 50px; left: 20px; z-index: 1; height: 0; padding-right: 10px; font-weight: bold; line-height: 0; color: #000; border: 15px solid #ee7600; border-right-color: transparent; /*右邊框透明,變成空缺的角*/ content: '書簽'; box-shadow: 0 5px 5px -5px #000; } .div2:after { /*書簽的夾角*/ content: ''; position: absolute; top: 80px; left: 20px; border: 4px solid #89540c; border-left-color: transparent; border-bottom-color: transparent; } </style> </head> <body> <div class="div1"></div> <div class="div2"></div> </body> </html>
總結(jié)
以上就是這篇文章的全部?jī)?nèi)容了,希望本文的內(nèi)容對(duì)大家的學(xué)習(xí)或者工作能帶來(lái)一定的幫助,如果有疑問大家可以留言交流。
【網(wǎng)站聲明】本站除付費(fèi)源碼經(jīng)過(guò)測(cè)試外,其他素材未做測(cè)試,不保證完整性,網(wǎng)站上部分源碼僅限學(xué)習(xí)交流,請(qǐng)勿用于商業(yè)用途。如損害你的權(quán)益請(qǐng)聯(lián)系客服QQ:2655101040 給予處理,謝謝支持。