CSS實現書籤圖案的效果

來源:互聯網
上載者:User
這次給大家帶來CSS實現書籤圖案的效果,CSS實現書籤圖案的注意事項有哪些,下面就是實戰案例,一起來看一下。

範例程式碼如下:

<!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>

相信看了本文案例你已經掌握了方法,更多精彩請關注php中文網其它相關文章!

推薦閱讀:

css中的float的圖文詳解

html+css中的四種隱藏方式

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.