溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

怎么利用CSS實(shí)現(xiàn)書簽效果

發(fā)布時(shí)間:2021-03-20 09:40:52 來源:億速云 閱讀:820 作者:小新 欄目:web開發(fā)

小編給大家分享一下怎么利用CSS實(shí)現(xiàn)書簽效果,希望大家閱讀完這篇文章之后都有所收獲,下面讓我們一起去探討吧!

實(shí)現(xiàn)的效果圖如下:

怎么利用CSS實(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>

看完了這篇文章,相信你對“怎么利用CSS實(shí)現(xiàn)書簽效果”有了一定的了解,如果想了解更多相關(guān)知識,歡迎關(guān)注億速云行業(yè)資訊頻道,感謝各位的閱讀!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

css
AI