示例代碼如下:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>border制作書簽(圖形)</title> <style> .p2:before { /*做一個書簽效果*/ 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>
相信看了本文案例你已經掌握了方法,更多精彩請關注Gxl網其它相關文章!
推薦閱讀:
css中的float的圖文詳解
html+css中的四種隱藏方式
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com