乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      css3 漸變邊框如何實(shí)現(xiàn)圓角效果

       頭號碼甲 2022-11-21 發(fā)布于北京

      常規(guī)的 border-image 屬性如果直接使用 border-radius 會無效,關(guān)于如何實(shí)現(xiàn)漸變邊框圓角,網(wǎng)上流傳著大概這么幾種辦法:

      1. 漸變背景方式(僅適用于純底色背景)
      2. 借助 after 偽類(僅適用于純底色背景)
      3. 借助 css3 中的 mask 遮罩蒙版 加 after 偽類實(shí)現(xiàn)(僅適用于任何背景,但需要考慮瀏覽器兼容性)

      本文僅介紹第三中方法:

      源碼如下:

      <style>
      .border-radius-4 {
        position: relative;
        z-index: 1;
        width: 80px;
        height: 80px;
        text-align: center;
        padding: 10px;
        box-sizing: border-box;
      }
      .border-radius-4:after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        z-index: -1;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: linear-gradient(to bottom right, rgba(98, 54, 255, 0.3), rgba(252, 53, 100, 0.3));
        /* 徑向漸變中的 30px 計(jì)算方法為 (寬度 / 2 - 邊框大小),此處為 80px / 2 - 10px */
        mask-image: radial-gradient(transparent 0 30px, #000 30px);
        -webkit-mask-image: radial-gradient(transparent 0 30px, #000 30px);
      }
      </style>
      <div class="border-radius-4">內(nèi)容</div>

      效果參考地址

        本站是提供個(gè)人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多