示例代碼如下:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>border制作書簽(圖形)</title> <style> .p2: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; } .p2:after { /*書簽的夾角*/ content: ''; position: absolute; top: 80px; left: 20px; border: 4px solid #89540c; border-left-color: transparent; border-bottom-color: transparent; } </style> </head> <body> <p class="p1"></p> <p class="p2"></p> </body> </html>
相信看了本文案例你已經(jīng)掌握了方法,更多精彩請關(guān)注Gxl網(wǎng)其它相關(guān)文章!
推薦閱讀:
css中的float的圖文詳解
html+css中的四種隱藏方式
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com