微信渐变国旗头像的css实现

时间:2022-05-27 21:28:20   收藏:0   阅读:32
<div id="container"></div>

    <style>
        #container{
            position: relative;
            margin: auto;
            width: 200px;
            height: 200px;
            background: url(‘./avatar.jfif‘) no-repeat;
            background-size: cover;
        }

        #container::after{
            content: "";
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            background: url(‘./flag.jfif‘) no-repeat;
            background-size: cover;
            mask: linear-gradient(110deg, #000 10%, transparent 70%, transparent);
            -webkit-mask: linear-gradient(110deg, #000 10%, transparent 70%, transparent);
        }
    </style>

原文:https://www.cnblogs.com/pangqianjin/p/15360090.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!